:root {
  --soil: #70411f;
  --soil-dark: #3f2416;
  --grass: #5e9b4a;
  --grass-bright: #8ac96a;
  --deep: #173326;
  --deep-2: #0d2119;
  --panel: rgba(255, 244, 217, .88);
  --paper: #fff4d9;
  --cream: #f5dfad;
  --ink: #1f291f;
  --muted: #66725f;
  --line: rgba(73, 70, 42, .18);
  --gold: #efb84d;
  --green: #2d8f59;
  --red: #bf4736;
  --sky: #9ed8ee;
  --shadow: 0 24px 80px rgba(21, 37, 22, .22);
  --panel-shadow: 0 18px 58px rgba(18, 34, 22, .2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #182a1f;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 231, 135, .6), transparent 30%),
    radial-gradient(circle at 80% 8%, rgba(156, 211, 238, .6), transparent 35%),
    linear-gradient(180deg, #d7efd4 0%, #9fcf75 43%, #7f9e4d 72%, #4d4f2e 100%);
  font-family: "Nunito Sans", system-ui, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: .18;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.7) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 14%, rgba(255,255,255,.45) 0 1px, transparent 2px),
    radial-gradient(circle at 44% 78%, rgba(25, 20, 8, .28) 0 1px, transparent 2px);
  background-size: 160px 160px, 220px 220px, 180px 180px;
  mix-blend-mode: soft-light;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.game-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 370px;
  gap: 18px;
  padding: 18px;
}

.left-rail,
.right-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  position: relative;
  z-index: 20;
}

.brand,
.profile-card,
.season-card,
.missions,
.detail-card,
.tabs,
.topbar {
  border: 1px solid rgba(255, 255, 255, .5);
  background:
    linear-gradient(145deg, rgba(255, 248, 226, .95), rgba(238, 216, 167, .8)),
    var(--panel);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(18px) saturate(1.12);
}

.brand {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  color: var(--ink);
  text-decoration: none;
}

.brand > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at 36% 25%, rgba(255,255,255,.9), transparent 28%),
    linear-gradient(135deg, #f0b847, #39844f 68%, #173326);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .48),
    0 12px 24px rgba(23, 51, 38, .22);
  font-size: 23px;
}

.brand strong,
.brand small,
.profile-card strong,
.profile-card small,
.season-card span,
.season-card strong {
  display: block;
}

.brand strong,
h1,
h2,
h3 {
  font-family: Fraunces, Georgia, serif;
}

.brand strong {
  font-size: 20px;
  letter-spacing: -.04em;
}

.brand small,
.profile-card small,
.season-card span,
.section-head span,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.profile-card,
.season-card,
.missions,
.detail-card,
.tabs {
  border-radius: 22px;
  padding: 14px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 20%, rgba(255,255,255,.4), transparent 28%),
    linear-gradient(135deg, var(--deep), #4b8d5a);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(23, 51, 38, .24);
}

.season-card {
  display: grid;
  gap: 10px;
}

.season-card > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.season-card strong {
  font-size: 21px;
}

.season-card p {
  margin: 0;
  padding: 11px 12px;
  border-radius: 15px;
  background: rgba(45, 143, 89, .12);
  color: #2f6848;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-head button,
.quick-actions button,
.tabs nav button,
.action-button,
.small-button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.32)),
    rgba(23, 51, 38, .08);
  color: var(--deep);
  font-size: 13px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .64);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.section-head button:hover,
.quick-actions button:hover,
.tabs nav button:hover,
.action-button:hover,
.small-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.mission {
  display: grid;
  gap: 5px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.mission:first-child {
  border-top: 0;
}

.mission strong {
  font-size: 13px;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 51, 38, .12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
}

.progress span {
  display: block;
  height: 100%;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, #398f57, #99c85e, #efb84d);
}

.play-area {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 26px;
  position: sticky;
  top: 18px;
  z-index: 30;
}

.resource-pill {
  min-height: 52px;
  min-width: 92px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 0 15px;
  border-radius: 17px;
  background:
    radial-gradient(circle at 16% 10%, rgba(255,255,255,.85), transparent 36%),
    rgba(255, 255, 255, .64);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: inset 0 -10px 22px rgba(120, 85, 38, .05);
}

.resource-pill span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.resource-pill strong {
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.resource-pill.money strong,
.resource-pill.atmosphere strong {
  color: #17633f;
}

.quick-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.farm-stage {
  position: relative;
  min-height: calc(100vh - 132px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(137, 211, 240, .98) 0 28%, transparent 28%),
    radial-gradient(circle at 48% 38%, rgba(255, 244, 172, .22), transparent 22%),
    linear-gradient(180deg, #86c86a 0%, #75ad53 50%, #8a6a3e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    0 34px 110px rgba(29, 48, 22, .34);
}

.farm-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 35% 50%, rgba(255,255,255,.4), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.03));
  transition: opacity .5s ease;
}

body[data-weather="mist"] .farm-stage::after,
body[data-weather="cloudy"] .farm-stage::after {
  opacity: .56;
}

body[data-weather="rain"] .farm-stage {
  filter: saturate(.9) brightness(.92);
}

body[data-weather="rain"] .sun {
  opacity: .28;
}

body[data-weather="rain"] .cloud {
  background: rgba(92, 108, 114, .62);
  box-shadow: 32px 4px 0 rgba(92,108,114,.52), 68px -8px 0 rgba(92,108,114,.48);
}

.cinematic-vignette {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  box-shadow:
    inset 0 -95px 110px rgba(21, 24, 12, .22),
    inset 0 0 120px rgba(16, 31, 21, .18);
}

.weather-layer {
  position: absolute;
  inset: -20%;
  z-index: 11;
  overflow: hidden;
  pointer-events: none;
}

.weather-layer span {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: repeating-linear-gradient(106deg, rgba(232, 248, 255, .78) 0 1px, transparent 1px 18px);
  transform: translateY(-12%);
  animation: rainFall .72s linear infinite;
}

.weather-layer span:nth-child(2) {
  left: 13%;
  animation-delay: -.22s;
  opacity: 0;
}

.weather-layer span:nth-child(3) {
  left: -9%;
  animation-delay: -.44s;
  opacity: 0;
}

body[data-weather="rain"] .weather-layer span {
  opacity: .45;
}

.horizon-layer {
  position: absolute;
  inset: 0 0 auto;
  height: 37%;
  z-index: 1;
  pointer-events: none;
}

.mountain {
  position: absolute;
  bottom: 2%;
  width: 34%;
  height: 54%;
  clip-path: polygon(0 100%, 32% 20%, 50% 48%, 72% 6%, 100% 100%);
  background:
    linear-gradient(145deg, rgba(255,255,255,.65) 0 16%, transparent 17%),
    linear-gradient(135deg, #6f9a83, #3f644f);
  opacity: .55;
}

.mountain-a {
  left: 2%;
}

.mountain-b {
  right: 4%;
  transform: scaleX(-1);
  opacity: .42;
}

.forest-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 58px;
  background:
    radial-gradient(ellipse at 6% 100%, #2e5a38 0 28px, transparent 29px),
    radial-gradient(ellipse at 15% 100%, #386a42 0 34px, transparent 35px),
    radial-gradient(ellipse at 24% 100%, #2b5738 0 30px, transparent 31px),
    radial-gradient(ellipse at 38% 100%, #3a6f45 0 36px, transparent 37px),
    radial-gradient(ellipse at 52% 100%, #2d5f3a 0 28px, transparent 29px),
    radial-gradient(ellipse at 68% 100%, #386a42 0 36px, transparent 37px),
    radial-gradient(ellipse at 82% 100%, #2b5738 0 30px, transparent 31px),
    radial-gradient(ellipse at 94% 100%, #3a6f45 0 34px, transparent 35px);
}

.village {
  position: absolute;
  bottom: 8px;
  width: 68px;
  height: 34px;
  opacity: .55;
  background:
    linear-gradient(135deg, transparent 0 18%, #8e4632 19% 42%, transparent 43%),
    linear-gradient(90deg, #e8c987 0 32%, transparent 32% 38%, #e8c987 38% 68%, transparent 68%);
}

.village-a {
  left: 24%;
}

.village-b {
  right: 20%;
  transform: scale(.82);
}

.sky-layer {
  position: absolute;
  inset: 0 0 auto;
  height: 36%;
  z-index: 2;
  pointer-events: none;
}

.sun {
  position: absolute;
  top: 34px;
  right: 70px;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff9b4 0 34%, #f5bf4e 58%, rgba(245, 191, 78, 0) 70%);
  filter: drop-shadow(0 0 38px rgba(245, 191, 78, .62));
  animation: sunPulse 4s ease-in-out infinite;
}

.cloud {
  position: absolute;
  width: 136px;
  height: 39px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 32px 4px 0 rgba(255, 255, 255, .55), 68px -8px 0 rgba(255, 255, 255, .62);
  animation: cloudDrift 34s linear infinite;
}

.cloud-a {
  top: 44px;
  left: -180px;
}

.cloud-b {
  top: 112px;
  left: 22%;
  transform: scale(.72);
  animation-duration: 48s;
}

.bird {
  position: absolute;
  color: rgba(23, 51, 38, .68);
  font-size: 27px;
  font-weight: 950;
  animation: birdFly 18s linear infinite;
}

.bird-a {
  top: 74px;
  left: -40px;
}

.bird-b {
  top: 126px;
  left: -140px;
  animation-delay: 7s;
}

.farm-map {
  position: absolute;
  inset: 20% 24px 24px;
  min-height: 570px;
  overflow: hidden;
  border-radius: 32px;
  z-index: 5;
  background:
    radial-gradient(circle at 42% 45%, rgba(255,255,255,.13), transparent 28%),
    radial-gradient(circle at 78% 22%, rgba(255, 226, 137, .15), transparent 22%),
    repeating-linear-gradient(32deg, rgba(255,255,255,.035) 0 18px, transparent 18px 36px),
    linear-gradient(145deg, #7fb85e 0%, #669b4a 45%, #9a7142 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.22),
    inset 0 -44px 80px rgba(59, 41, 20, .22);
}

.terrain-shadow,
.farm-road,
.water-channel,
.orchard {
  position: absolute;
  pointer-events: none;
}

.terrain-shadow {
  inset: 9% 4% 8%;
  border-radius: 44% 36% 38% 42%;
  background: radial-gradient(ellipse at center, rgba(25, 52, 24, .18), transparent 64%);
  filter: blur(18px);
}

.farm-road {
  left: 44%;
  top: 4%;
  width: 16%;
  height: 112%;
  transform: rotate(25deg);
  border-radius: 999px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.09) 0 16px, transparent 16px 38px),
    linear-gradient(90deg, rgba(88, 59, 30, .2), rgba(238, 194, 113, .74), rgba(93, 61, 31, .24));
  box-shadow: 0 0 0 10px rgba(61, 86, 42, .08);
}

.water-channel {
  right: -3%;
  bottom: 10%;
  width: 38%;
  height: 82px;
  transform: rotate(-14deg);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 50%, rgba(255,255,255,.55), transparent 18%),
    linear-gradient(90deg, rgba(63, 153, 171, .25), rgba(70, 166, 192, .78), rgba(33, 104, 133, .55));
  filter: saturate(1.14);
  box-shadow: inset 0 8px 16px rgba(255,255,255,.16), 0 18px 42px rgba(18, 78, 96, .2);
  animation: waterGlint 4s ease-in-out infinite;
}

.orchard {
  right: 2%;
  bottom: 26%;
  width: 22%;
  height: 112px;
  opacity: .9;
  background-image:
    radial-gradient(circle at 18px 18px, #2e6b3a 0 13px, transparent 14px),
    radial-gradient(circle at 58px 54px, #347542 0 14px, transparent 15px),
    radial-gradient(circle at 100px 20px, #285b34 0 12px, transparent 13px);
  background-size: 82px 70px;
  filter: drop-shadow(0 10px 12px rgba(22, 43, 21, .18));
}

.field-grid {
  position: absolute;
  left: 4%;
  bottom: 8%;
  width: 54%;
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  gap: 16px 12px;
  z-index: 5;
  transform: rotate(-5deg);
}

.field-tile,
.building,
.animal-pen {
  position: relative;
  border: 0;
  color: inherit;
  text-align: left;
}

.field-tile {
  min-height: 138px;
  overflow: hidden;
  isolation: isolate;
  padding: 12px;
  border-radius: 24px 14px 28px 16px;
  background:
    linear-gradient(0deg, rgba(65, 36, 20, .92), rgba(122, 70, 32, .95)),
    var(--soil);
  box-shadow:
    inset 0 0 0 2px rgba(255, 237, 182, .12),
    inset 0 -20px 30px rgba(0,0,0,.12),
    0 20px 34px rgba(54, 41, 21, .22);
  transform: skewY(-4deg);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.field-tile:hover {
  transform: translateY(-3px) skewY(-4deg);
  filter: brightness(1.05);
  box-shadow:
    inset 0 0 0 2px rgba(255, 237, 182, .18),
    inset 0 -20px 30px rgba(0,0,0,.12),
    0 26px 44px rgba(54, 41, 21, .27);
}

.field-tile.locked {
  filter: grayscale(.7) brightness(.78);
  opacity: .72;
}

.field-shadow {
  position: absolute;
  left: 12%;
  right: 5%;
  bottom: 4px;
  height: 22px;
  border-radius: 50%;
  background: rgba(35, 22, 12, .22);
  filter: blur(6px);
}

.crop-bed {
  position: absolute;
  inset: 12px;
  overflow: hidden;
  border-radius: 18px 9px 20px 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.07), transparent 22%, rgba(0,0,0,.08)),
    repeating-linear-gradient(92deg, rgba(54, 30, 17, .92) 0 10px, rgba(122, 76, 38, .92) 10px 18px);
}

.furrows,
.crop-sprite {
  position: absolute;
  inset: 9px;
  border-radius: 14px;
}

.furrows {
  background: repeating-linear-gradient(90deg, rgba(255, 222, 150, .11) 0 2px, transparent 2px 16px);
  mix-blend-mode: screen;
}

.crop-sprite {
  opacity: 0;
  background-size: 24px 24px;
  transform-origin: bottom;
}

.stage-seed .crop-sprite {
  opacity: .78;
  background-image: radial-gradient(circle, #d4b071 0 3px, transparent 4px);
}

.stage-sprout .crop-sprite {
  opacity: .95;
  background-image:
    radial-gradient(ellipse at bottom, #79bf58 0 5px, transparent 6px),
    radial-gradient(ellipse at top, rgba(255,255,255,.26) 0 1px, transparent 5px);
  animation: fieldWind 2.8s ease-in-out infinite;
}

.stage-growing .crop-sprite,
.stage-ready .crop-sprite {
  opacity: 1;
  background-image:
    linear-gradient(80deg, transparent 38%, rgba(38, 111, 48, .92) 42% 48%, transparent 52%),
    linear-gradient(100deg, transparent 42%, var(--crop-color) 44% 54%, transparent 58%);
  animation: fieldWind 2.2s ease-in-out infinite;
}

.stage-ready .crop-bed::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  background: radial-gradient(circle, rgba(255, 236, 143, .76), transparent 62%);
  animation: readyGlow 1.6s ease-in-out infinite;
}

.field-label,
.building-label {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(255, 247, 224, .9);
  color: #31412f;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(50, 58, 28, .14);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #97a17c;
}

.status-dot.ready {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(239, 184, 77, .24);
}

.status-dot.working {
  background: #42b883;
  box-shadow: 0 0 0 5px rgba(66, 184, 131, .18);
}

.timer-badge {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: 12px;
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(16, 35, 25, .88);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.growth-meter {
  position: absolute;
  z-index: 4;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.18);
}

.growth-meter i {
  display: block;
  width: var(--growth);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7ec95d, #efc253);
}

.building-grid {
  position: absolute;
  right: 4%;
  top: 12%;
  width: 40%;
  display: grid;
  grid-template-columns: repeat(2, minmax(124px, 1fr));
  gap: 20px 16px;
  z-index: 6;
}

.building {
  min-height: 132px;
  overflow: visible;
  padding: 12px;
  background: transparent;
  transform: translateZ(0);
  transition: transform .18s ease, filter .18s ease;
}

.building:hover {
  transform: translateY(-4px);
  filter: brightness(1.05);
}

.building-shadow {
  position: absolute;
  left: 12%;
  right: 6%;
  bottom: 4px;
  height: 28px;
  border-radius: 50%;
  background: rgba(33, 24, 12, .26);
  filter: blur(8px);
}

.building-face {
  position: absolute;
  left: 14px;
  right: 12px;
  bottom: 15px;
  height: 76px;
  border-radius: 13px 13px 18px 18px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.18), transparent 38%, rgba(0,0,0,.12)),
    linear-gradient(145deg, #e6b06e, #a75d35);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.26),
    inset 0 -12px 20px rgba(54, 26, 12, .14),
    0 16px 24px rgba(54, 34, 18, .18);
}

.building-roof {
  position: absolute;
  left: 7px;
  right: 4px;
  top: 20px;
  height: 48px;
  z-index: 2;
  clip-path: polygon(12% 100%, 50% 0, 90% 100%);
  background:
    linear-gradient(135deg, rgba(255,255,255,.26), transparent 35%),
    linear-gradient(135deg, #822f24, #c85e39);
  filter: drop-shadow(0 9px 10px rgba(57, 27, 13, .22));
}

.building-window {
  position: absolute;
  z-index: 3;
  bottom: 42px;
  width: 16px;
  height: 18px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 35% 26%, rgba(255,255,255,.8), transparent 18%),
    linear-gradient(145deg, #ffe28b, #8fa15e);
  box-shadow: inset 0 0 0 2px rgba(85, 46, 27, .18);
}

.window-a {
  left: 30px;
}

.window-b {
  right: 31px;
}

.building-smoke {
  position: absolute;
  right: 26px;
  top: 4px;
  width: 16px;
  height: 36px;
  border-radius: 999px;
  opacity: 0;
  background: rgba(255,255,255,.55);
  filter: blur(4px);
}

.building.producing .building-smoke {
  opacity: 1;
  animation: smoke 1.8s ease-in-out infinite;
}

.building.ready .building-face {
  box-shadow:
    inset 0 0 0 3px rgba(255, 229, 118, .42),
    0 0 0 8px rgba(239, 184, 77, .16),
    0 16px 24px rgba(54, 34, 18, .18);
}

.building.missing .building-face {
  filter: grayscale(.38);
  background: linear-gradient(145deg, #ded1b7, #99755a);
}

.building-silo .building-face {
  border-radius: 42px 42px 16px 16px;
  background: linear-gradient(90deg, #d7d1bd, #9a9e92 50%, #696e68);
}

.building-silo .building-roof {
  top: 10px;
  left: 28px;
  right: 28px;
  height: 42px;
  clip-path: ellipse(50% 50% at 50% 50%);
  background: linear-gradient(135deg, #f2f0d8, #919b8d);
}

.building-mill .building-face::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 66px;
  height: 66px;
  transform: translate(-50%, -58%) rotate(12deg);
  background:
    linear-gradient(90deg, transparent 46%, rgba(245,239,205,.9) 47% 53%, transparent 54%),
    linear-gradient(0deg, transparent 46%, rgba(245,239,205,.9) 47% 53%, transparent 54%);
  border-radius: 50%;
  animation: millTurn 8s linear infinite;
}

.building-dairy .building-face {
  background: linear-gradient(145deg, #eaf2e8, #9eb6b0);
}

.building-chicken-coop .building-face {
  background: linear-gradient(145deg, #e0a05e, #8e4f32);
}

.building-cow-stable .building-face {
  background: linear-gradient(145deg, #b98554, #6e4329);
}

.building-machine-house .building-face {
  background: linear-gradient(145deg, #b4bdac, #676f60);
}

.building-trade-office .building-face {
  background: linear-gradient(145deg, #dec27b, #9e723a);
}

.building-level {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 247, 224, .84);
  color: #5e3c24;
  font-size: 11px;
  font-weight: 950;
}

.building-label {
  margin-top: 2px;
}

.animal-zone {
  position: absolute;
  left: 12%;
  right: 37%;
  top: 5%;
  height: 194px;
  overflow: hidden;
  z-index: 4;
  border-radius: 36px 24px 40px 28px;
  background:
    radial-gradient(circle at 17% 70%, rgba(255,255,255,.18), transparent 20%),
    repeating-linear-gradient(88deg, rgba(80, 72, 42, .3) 0 5px, transparent 5px 26px),
    linear-gradient(145deg, rgba(123, 183, 84, .82), rgba(83, 137, 67, .76));
  box-shadow:
    inset 0 0 0 3px rgba(255,255,255,.14),
    inset 0 -22px 40px rgba(36, 61, 27, .12);
}

.animal-zone::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 3px solid rgba(112, 77, 42, .45);
  border-left-style: dashed;
  border-right-style: dashed;
  border-radius: 28px;
}

.animal {
  position: absolute;
  width: 48px;
  height: 34px;
  background: transparent;
  animation: animalWalk 7s ease-in-out infinite;
}

.animal-shadow {
  position: absolute;
  left: 4px;
  right: 2px;
  bottom: -5px;
  height: 12px;
  border-radius: 50%;
  background: rgba(18, 34, 18, .22);
  filter: blur(3px);
}

.animal-body {
  position: absolute;
  inset: 6px 5px 4px 4px;
  border-radius: 50% 48% 42% 44%;
  background: #f6f1df;
  box-shadow: inset -9px -5px 0 rgba(0, 0, 0, .08);
}

.animal-head {
  position: absolute;
  right: 1px;
  top: 4px;
  width: 17px;
  height: 15px;
  border-radius: 48%;
  background: #f7f0df;
  box-shadow: inset -5px -3px 0 rgba(0,0,0,.06);
}

.animal::before,
.animal::after {
  content: "";
  position: absolute;
  bottom: -2px;
  width: 4px;
  height: 10px;
  border-radius: 999px;
  background: #5d493a;
}

.animal::before {
  left: 13px;
}

.animal::after {
  right: 13px;
}

.animal.chicken {
  width: 30px;
  height: 25px;
}

.animal.chicken .animal-body {
  inset: 7px 5px 4px 3px;
  background: #fff9e9;
}

.animal.chicken .animal-head {
  right: 2px;
  top: 4px;
  width: 11px;
  height: 10px;
}

.animal.chicken i {
  position: absolute;
  z-index: 2;
  top: 1px;
  right: 6px;
  width: 8px;
  height: 7px;
  border-radius: 50%;
  background: #d85b4a;
}

.animal.cow .animal-body {
  background:
    radial-gradient(circle at 42% 45%, #333 0 5px, transparent 6px),
    radial-gradient(circle at 68% 58%, #333 0 4px, transparent 5px),
    #fffaf0;
}

.animal.cow .animal-head {
  background:
    radial-gradient(circle at 50% 55%, #333 0 3px, transparent 4px),
    #fffaf0;
}

.animal-pen {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(255,255,255,.25);
  color: #28422d;
  font-weight: 950;
}

.tractor {
  position: absolute;
  left: 5%;
  bottom: 3%;
  width: 86px;
  height: 44px;
  z-index: 7;
  border-radius: 16px 10px 10px 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.2), transparent 30%),
    linear-gradient(135deg, #b83024, #f27842);
  box-shadow: 0 14px 24px rgba(61, 40, 21, .2);
  animation: tractorLoop 24s linear infinite;
}

.tractor::before,
.tractor::after {
  content: "";
  position: absolute;
  bottom: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #454545 0 34%, #111 35% 62%, #2c2c2c 63%);
}

.tractor::before {
  left: 8px;
}

.tractor::after {
  right: 10px;
}

.tractor span {
  position: absolute;
  top: -18px;
  left: 29px;
  width: 30px;
  height: 25px;
  border-radius: 9px 9px 0 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), transparent 48%),
    #173326;
}

.dust {
  position: absolute;
  z-index: 6;
  width: 44px;
  height: 18px;
  border-radius: 50%;
  background: rgba(221, 187, 119, .38);
  filter: blur(5px);
  animation: dustFloat 9s ease-in-out infinite;
}

.dust-a {
  left: 18%;
  bottom: 15%;
}

.dust-b {
  right: 22%;
  top: 48%;
  animation-delay: 3s;
}

.right-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.detail-card h2,
.detail-card h3 {
  margin: 0 0 8px;
  font-size: 29px;
  line-height: 1;
  letter-spacing: -.045em;
}

.detail-card p {
  color: var(--muted);
  line-height: 1.48;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.stat {
  padding: 11px;
  border-radius: 15px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,.75), transparent 36%),
    rgba(255, 255, 255, .66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.action-button {
  min-height: 42px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.28), transparent 34%),
    linear-gradient(135deg, var(--deep), #438755);
  box-shadow: 0 12px 24px rgba(23, 51, 38, .2);
}

.action-button.secondary {
  color: var(--deep);
  background: rgba(23, 51, 38, .1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}

.action-button.danger {
  background: linear-gradient(135deg, #9e3128, #df7556);
}

.tabs {
  min-height: 360px;
}

.tabs nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.tabs nav button.active {
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.24), transparent 32%),
    var(--deep);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 9px;
}

.inventory-row,
.market-row,
.leader-row,
.profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.72), transparent 36%),
    rgba(255, 255, 255, .66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.56);
}

.inventory-row small,
.market-row small,
.leader-row small,
.profile-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.storage-bar {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 51, 38, .11);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}

.storage-bar span {
  display: block;
  width: var(--storage);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3f9c5d, #8fc762, #efb84d);
}

.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 48% 35%, rgba(255, 220, 132, .18), transparent 34%),
    rgba(13, 33, 25, .74);
  backdrop-filter: blur(12px);
}

.welcome-modal[hidden] {
  display: none;
}

.welcome-card {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  padding: 32px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 248, 226, .98), rgba(239, 216, 167, .92)),
    var(--paper);
  box-shadow: 0 34px 100px rgba(0, 0, 0, .34);
}

.welcome-card h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 66px);
  line-height: .9;
  letter-spacing: -.065em;
}

.welcome-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.welcome-card label {
  display: grid;
  gap: 7px;
  color: var(--deep);
  font-weight: 950;
}

.welcome-card input {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.84);
  outline: 0;
}

.welcome-card input:focus {
  border-color: rgba(45, 143, 89, .6);
  box-shadow: 0 0 0 4px rgba(45, 143, 89, .13);
}

.welcome-card button {
  min-height: 54px;
  border-radius: 17px;
  background:
    radial-gradient(circle at 20% 14%, rgba(255,255,255,.28), transparent 34%),
    linear-gradient(135deg, var(--deep), #4d9961);
  color: #fff;
  font-weight: 950;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  max-width: 360px;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 17px;
  background:
    radial-gradient(circle at 16% 10%, rgba(255,255,255,.18), transparent 32%),
    rgba(23, 51, 38, .96);
  color: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
  font-weight: 850;
  animation: toastIn .25s ease both;
}

.ready-pulse {
  animation: readyPulse 1.4s ease-in-out infinite;
}

@keyframes sunPulse {
  50% { transform: scale(1.05); }
}

@keyframes cloudDrift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 260px)); }
}

@keyframes birdFly {
  from { transform: translateX(0) translateY(0); }
  50% { transform: translateX(50vw) translateY(-18px); }
  to { transform: translateX(calc(100vw + 180px)) translateY(4px); }
}

@keyframes rainFall {
  from { transform: translateY(-18%) translateX(0); }
  to { transform: translateY(18%) translateX(-6%); }
}

@keyframes fieldWind {
  0%, 100% { transform: skewX(-2deg) translateX(-1px); }
  50% { transform: skewX(3deg) translateX(2px); }
}

@keyframes readyGlow {
  50% { opacity: .42; transform: scale(1.08); }
}

@keyframes smoke {
  from { transform: translateY(10px) scale(.8); opacity: .15; }
  55% { opacity: .78; }
  to { transform: translateY(-22px) scale(1.7); opacity: 0; }
}

@keyframes millTurn {
  to { transform: translate(-50%, -58%) rotate(372deg); }
}

@keyframes animalWalk {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(20px, 6px) rotate(2deg); }
  50% { transform: translate(4px, 19px) rotate(-2deg); }
  75% { transform: translate(-16px, 8px) rotate(1deg); }
}

@keyframes tractorLoop {
  0% { transform: translate(0, 0) rotate(0); }
  38% { transform: translate(38vw, -18px) rotate(-2deg); }
  48% { transform: translate(42vw, 58px) rotate(8deg); }
  86% { transform: translate(5vw, 72px) rotate(180deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes dustFloat {
  50% { transform: translate(22px, -14px) scale(1.25); opacity: .55; }
}

@keyframes waterGlint {
  50% { filter: saturate(1.35) brightness(1.12); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
}

@keyframes readyPulse {
  50% { transform: translateY(-2px); filter: brightness(1.1); }
}

@media (max-width: 1360px) {
  .game-shell {
    grid-template-columns: 250px minmax(0, 1fr) 340px;
  }

  .resource-pill {
    min-width: 82px;
    padding-inline: 12px;
  }
}

@media (max-width: 1180px) {
  .game-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .right-panel {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1.25fr;
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
    position: relative;
    top: auto;
  }

  .quick-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 820px) {
  .game-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .left-rail,
  .right-panel {
    grid-template-columns: 1fr;
  }

  .farm-stage {
    min-height: 980px;
  }

  .farm-map {
    inset: 15% 10px 10px;
  }

  .field-grid,
  .building-grid,
  .animal-zone {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    transform: none;
  }

  .animal-zone {
    margin: 148px 12px 0;
  }

  .field-grid {
    margin: 20px 12px 0;
    grid-template-columns: 1fr 1fr;
  }

  .building-grid {
    margin: 24px 12px;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .resource-pill {
    min-width: calc(50% - 6px);
  }

  .field-grid,
  .building-grid {
    grid-template-columns: 1fr;
  }

  .tabs nav {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Forge-inspireret strategi-kort: fuldskærm, central bosættelse og diskret HUD. */
.foe-world {
  --wood: #4b2b17;
  --wood-dark: #241207;
  --wood-light: #8a5a2d;
  --parchment: #ead6a6;
  --parchment-light: #fff0bd;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 231, 149, .24), transparent 22%),
    radial-gradient(circle at 72% 26%, rgba(99, 151, 57, .42), transparent 28%),
    linear-gradient(180deg, #6e963e, #547d35 62%, #3f5a2b 100%);
}

.foe-world::before {
  opacity: .26;
  background-image:
    radial-gradient(circle at 20px 24px, rgba(255,255,255,.2) 0 1px, transparent 2px),
    radial-gradient(circle at 70px 80px, rgba(30, 48, 20, .24) 0 1px, transparent 2px);
  background-size: 110px 110px;
  mix-blend-mode: overlay;
}

.foe-world .game-shell {
  min-height: 100vh;
  display: block;
  padding: 0;
}

.foe-world .play-area {
  display: block;
  min-height: 100vh;
}

.foe-world .farm-stage {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 55%, rgba(32, 64, 28, .32), transparent 22%),
    radial-gradient(circle at 62% 36%, rgba(214, 183, 96, .16), transparent 15%),
    radial-gradient(circle at 82% 64%, rgba(35, 68, 29, .25), transparent 21%),
    linear-gradient(180deg, #79a948 0%, #628f3d 46%, #4a6d34 100%);
  box-shadow: none;
}

.foe-world .farm-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 22%, rgba(24, 62, 28, .58) 0 4%, transparent 15%),
    radial-gradient(ellipse at 14% 70%, rgba(21, 58, 28, .62) 0 6%, transparent 18%),
    radial-gradient(ellipse at 76% 50%, rgba(25, 64, 27, .44) 0 4%, transparent 15%),
    radial-gradient(ellipse at 50% 22%, rgba(87, 126, 52, .32) 0 5%, transparent 22%),
    repeating-linear-gradient(22deg, rgba(255,255,255,.025) 0 4px, transparent 4px 18px);
}

.foe-world .farm-stage::after {
  z-index: 4;
  opacity: .2;
  background:
    radial-gradient(circle at 52% 38%, rgba(255, 239, 176, .35), transparent 23%),
    radial-gradient(circle at 50% 50%, transparent 0 48%, rgba(17, 23, 11, .34) 100%);
}

.foe-world .horizon-layer,
.foe-world .sky-layer {
  display: none;
}

.foe-world .cinematic-vignette {
  z-index: 35;
  box-shadow:
    inset 0 74px 74px rgba(28, 15, 8, .22),
    inset 0 -90px 110px rgba(16, 18, 8, .3),
    inset 0 0 150px rgba(15, 18, 7, .18);
}

.foe-world .weather-layer {
  z-index: 34;
}

.foe-world .farm-map {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  overflow: hidden;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 48% 38%, rgba(193, 174, 96, .18) 0 8%, transparent 24%),
    radial-gradient(ellipse at 28% 56%, rgba(48, 84, 33, .24) 0 10%, transparent 24%),
    radial-gradient(circle at 60% 74%, rgba(219, 195, 111, .1), transparent 20%),
    repeating-linear-gradient(32deg, rgba(255,255,255,.03) 0 9px, transparent 9px 31px),
    linear-gradient(140deg, #77a947 0%, #659543 43%, #527a35 100%);
  box-shadow: none;
}

.foe-world .terrain-shadow {
  inset: 17% 26% 21% 22%;
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(24, 41, 14, .24), transparent 66%);
  filter: blur(24px);
}

.foe-world .water-channel {
  top: -7%;
  right: -5%;
  bottom: auto;
  width: 30vw;
  height: 34vh;
  transform: rotate(-17deg);
  z-index: 3;
  border-radius: 0 0 42% 58%;
  background:
    radial-gradient(ellipse at 26% 78%, rgba(255, 232, 159, .95) 0 13%, rgba(218, 185, 111, .9) 14% 24%, transparent 25%),
    radial-gradient(ellipse at 40% 65%, rgba(255,255,255,.3), transparent 18%),
    linear-gradient(135deg, #53b5b6, #116985 58%, #0d4b68);
  box-shadow:
    inset 0 18px 40px rgba(255,255,255,.16),
    0 30px 80px rgba(10, 58, 70, .22);
}

.foe-world .farm-road {
  left: 50%;
  top: 31%;
  width: 68px;
  height: 340px;
  z-index: 7;
  transform: translateX(-50%) rotate(0deg);
  background:
    linear-gradient(90deg, rgba(70, 48, 24, .22), rgba(205, 174, 111, .78), rgba(70, 48, 24, .2));
  box-shadow:
    inset 10px 0 18px rgba(76, 49, 24, .13),
    inset -8px 0 16px rgba(255,255,255,.09);
}

.foe-world .path {
  position: absolute;
  z-index: 7;
  pointer-events: none;
  height: 34px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), transparent),
    linear-gradient(90deg, rgba(74, 48, 24, .12), rgba(210, 179, 117, .74), rgba(74, 48, 24, .13));
  filter: drop-shadow(0 5px 3px rgba(53, 41, 22, .13));
}

.foe-world .path-north {
  left: 47%;
  top: 28%;
  width: 210px;
  transform: rotate(-34deg);
}

.foe-world .path-west {
  left: 34%;
  top: 44%;
  width: 250px;
  transform: rotate(25deg);
}

.foe-world .path-east {
  left: 50%;
  top: 43%;
  width: 260px;
  transform: rotate(-22deg);
}

.foe-world .path-south {
  left: 42%;
  top: 56%;
  width: 190px;
  transform: rotate(62deg);
}

.foe-world .orchard {
  left: 11%;
  right: auto;
  bottom: auto;
  top: 19%;
  width: 24vw;
  height: 54vh;
  z-index: 4;
  opacity: .88;
  background-image:
    radial-gradient(circle at 18px 18px, #2e6f35 0 13px, #1f4d29 14px 18px, transparent 19px),
    radial-gradient(circle at 58px 54px, #4d8d3f 0 14px, #24562b 15px 20px, transparent 21px),
    radial-gradient(circle at 100px 20px, #376f32 0 12px, #1f4d29 13px 18px, transparent 19px);
  background-size: 82px 70px;
  filter: drop-shadow(0 12px 9px rgba(11, 28, 12, .2));
}

.foe-world .map-decor {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.foe-world .tree {
  position: absolute;
  width: 54px;
  height: 72px;
  filter: drop-shadow(10px 14px 7px rgba(24, 32, 12, .24));
}

.foe-world .tree::before {
  content: "";
  position: absolute;
  left: 23px;
  bottom: 0;
  width: 8px;
  height: 25px;
  border-radius: 4px;
  background: linear-gradient(90deg, #4b2b17, #7a4c24);
}

.foe-world .tree::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 50px;
  height: 52px;
  border-radius: 48% 52% 45% 55%;
  background:
    radial-gradient(circle at 36% 25%, rgba(187, 224, 95, .72), transparent 22%),
    radial-gradient(circle at 65% 65%, rgba(19, 69, 25, .32), transparent 34%),
    linear-gradient(135deg, #6ea63c, #255d2a 72%);
}

.foe-world .tree-b,
.foe-world .tree-d,
.foe-world .tree-g,
.foe-world .tree-j {
  transform: scale(.78);
}

.foe-world .tree-c,
.foe-world .tree-h,
.foe-world .tree-l {
  transform: scale(1.22);
}

.foe-world .tree-a { left: 5%; top: 9%; }
.foe-world .tree-b { left: 17%; top: 12%; }
.foe-world .tree-c { left: 23%; top: 28%; }
.foe-world .tree-d { left: 7%; top: 58%; }
.foe-world .tree-e { left: 16%; top: 76%; }
.foe-world .tree-f { left: 31%; top: 70%; }
.foe-world .tree-g { left: 68%; top: 16%; }
.foe-world .tree-h { left: 81%; top: 36%; }
.foe-world .tree-i { left: 89%; top: 56%; }
.foe-world .tree-j { left: 71%; top: 76%; }
.foe-world .tree-k { left: 43%; top: 16%; }
.foe-world .tree-l { left: 4%; top: 38%; }

.foe-world .rock {
  position: absolute;
  width: 42px;
  height: 24px;
  border-radius: 46% 54% 42% 58%;
  background:
    radial-gradient(circle at 28% 25%, rgba(255,255,255,.24), transparent 28%),
    linear-gradient(135deg, #82745c, #4c493c);
  box-shadow: 8px 12px 8px rgba(28, 31, 15, .17);
}

.foe-world .rock-a { left: 37%; top: 24%; }
.foe-world .rock-b { left: 64%; top: 62%; transform: scale(.74); }
.foe-world .rock-c { left: 82%; top: 22%; transform: scale(.9); }

.foe-world .wildlife {
  position: absolute;
  width: 32px;
  height: 16px;
  border-radius: 45%;
  background: #4a2b17;
  box-shadow: 9px 8px 5px rgba(18, 24, 11, .18);
}

.foe-world .wildlife::before {
  content: "";
  position: absolute;
  right: -7px;
  top: 2px;
  width: 12px;
  height: 10px;
  border-radius: 50%;
  background: #4a2b17;
}

.foe-world .deer-a {
  left: 13%;
  top: 49%;
  animation: graze 7s ease-in-out infinite;
}

.foe-world .deer-b {
  left: 78%;
  top: 72%;
  transform: scale(.78);
  animation: graze 8s ease-in-out infinite reverse;
}

.foe-world .birds-ground {
  left: 33%;
  top: 34%;
  width: 44px;
  height: 20px;
  background:
    radial-gradient(circle at 8px 10px, #2c2117 0 3px, transparent 4px),
    radial-gradient(circle at 22px 7px, #2c2117 0 3px, transparent 4px),
    radial-gradient(circle at 34px 13px, #2c2117 0 3px, transparent 4px);
  box-shadow: none;
  animation: birdPeck 3.4s ease-in-out infinite;
}

.foe-world .birds-ground::before {
  display: none;
}

.foe-world .building-grid {
  left: 50%;
  top: 36%;
  width: 420px;
  height: 300px;
  display: block;
  z-index: 12;
  transform: translate(-50%, -50%);
}

.foe-world .building {
  position: absolute;
  width: 118px;
  min-height: 112px;
  padding: 0;
}

.foe-world .building:nth-child(1) {
  left: 146px;
  top: 0;
  transform: scale(1.2);
}

.foe-world .building:nth-child(2) {
  left: 278px;
  top: 88px;
  transform: scale(.88);
}

.foe-world .building:nth-child(3) {
  left: 24px;
  top: 150px;
  transform: scale(.93);
}

.foe-world .building:nth-child(4) {
  left: 272px;
  top: 178px;
  transform: scale(.95);
}

.foe-world .building:nth-child(5) {
  left: 132px;
  top: 132px;
  transform: scale(.98);
}

.foe-world .building:nth-child(6) {
  left: 42px;
  top: 44px;
  transform: scale(.88);
}

.foe-world .building:nth-child(7) {
  left: 160px;
  top: 230px;
  transform: scale(.82);
}

.foe-world .building:nth-child(8) {
  left: 286px;
  top: 12px;
  transform: scale(.8);
}

.foe-world .building:hover {
  filter: brightness(1.08);
}

.foe-world .building:nth-child(1):hover { transform: translateY(-5px) scale(1.2); }
.foe-world .building:nth-child(2):hover { transform: translateY(-5px) scale(.88); }
.foe-world .building:nth-child(3):hover { transform: translateY(-5px) scale(.93); }
.foe-world .building:nth-child(4):hover { transform: translateY(-5px) scale(.95); }
.foe-world .building:nth-child(5):hover { transform: translateY(-5px) scale(.98); }
.foe-world .building:nth-child(6):hover { transform: translateY(-5px) scale(.88); }
.foe-world .building:nth-child(7):hover { transform: translateY(-5px) scale(.82); }
.foe-world .building:nth-child(8):hover { transform: translateY(-5px) scale(.8); }

.foe-world .building-label {
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: .92;
  background: rgba(46, 28, 14, .78);
  color: #ffe9aa;
  box-shadow: 0 8px 16px rgba(22, 16, 8, .18);
}

.foe-world .building-level {
  top: 14px;
  right: 8px;
  bottom: auto;
  background: rgba(255, 234, 165, .9);
}

.foe-world .building-face {
  left: 10px;
  right: 10px;
  bottom: 11px;
  height: 70px;
}

.foe-world .building-roof {
  top: 17px;
}

.foe-world .field-grid {
  left: 27%;
  top: 55%;
  bottom: auto;
  width: 390px;
  grid-template-columns: repeat(3, 112px);
  gap: 12px;
  z-index: 10;
  transform: rotate(-10deg);
}

.foe-world .field-tile {
  min-height: 94px;
  border-radius: 14px 8px 16px 9px;
  transform: skewY(-8deg);
  box-shadow:
    inset 0 0 0 2px rgba(255, 225, 148, .14),
    inset 0 -16px 26px rgba(0,0,0,.13),
    10px 18px 18px rgba(35, 28, 14, .18);
}

.foe-world .field-tile:hover {
  transform: translateY(-3px) skewY(-8deg);
}

.foe-world .field-label {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(46, 28, 14, .78);
  color: #ffe9aa;
}

.foe-world .animal-zone {
  left: 13%;
  right: auto;
  top: 42%;
  width: 260px;
  height: 150px;
  z-index: 9;
  border-radius: 45% 42% 48% 44%;
  background:
    repeating-linear-gradient(90deg, rgba(96, 75, 41, .34) 0 4px, transparent 4px 20px),
    radial-gradient(circle at 28% 36%, rgba(255,255,255,.17), transparent 24%),
    linear-gradient(145deg, rgba(112, 159, 67, .82), rgba(66, 111, 48, .82));
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.14),
    18px 22px 18px rgba(26, 31, 14, .16);
}

.foe-world .tractor {
  left: 48%;
  bottom: 23%;
  z-index: 13;
  transform: scale(.68);
  animation: tractorFoE 28s linear infinite;
}

.foe-world .dust {
  z-index: 8;
  opacity: .7;
}

.foe-world .topbar {
  position: fixed;
  left: 50%;
  top: 0;
  width: min(960px, calc(100vw - 80px));
  min-height: 46px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 5px 12px;
  border-radius: 0 0 18px 18px;
  border: 1px solid rgba(18, 8, 3, .55);
  border-top: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.06), transparent 18%, rgba(255,255,255,.05)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 12px, transparent 12px 26px),
    linear-gradient(180deg, #6e4422, #3a1f0e 78%, #1f0f07);
  box-shadow:
    inset 0 -1px 0 rgba(255, 217, 130, .22),
    0 8px 28px rgba(20, 12, 5, .34);
}

.foe-world .topbar::before,
.foe-world .topbar::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #b9873e 0 38%, #4a2915 39% 64%, transparent 65%);
  box-shadow: 0 5px 12px rgba(15, 8, 3, .3);
}

.foe-world .topbar::before {
  left: -24px;
}

.foe-world .topbar::after {
  right: -24px;
}

.foe-world .resource-pill {
  min-width: 74px;
  min-height: 34px;
  padding: 0 10px;
  border-color: rgba(255, 230, 154, .22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.2), transparent 36%),
    linear-gradient(180deg, rgba(47, 26, 12, .72), rgba(23, 12, 5, .74));
  color: #ffeab1;
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 151, .18),
    0 4px 10px rgba(13, 8, 4, .16);
}

.foe-world .resource-pill span {
  color: rgba(255, 235, 181, .68);
  font-size: 9px;
}

.foe-world .resource-pill strong,
.foe-world .resource-pill.money strong,
.foe-world .resource-pill.atmosphere strong {
  color: #ffeab1;
  font-size: 14px;
}

.foe-world .quick-actions {
  gap: 5px;
}

.foe-world .quick-actions button,
.foe-world .tabs nav button,
.foe-world .small-button,
.foe-world .action-button,
.foe-world .section-head button {
  border: 1px solid rgba(53, 27, 11, .46);
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.28), transparent 36%),
    linear-gradient(180deg, #c9954a, #77461f 72%, #3f210e);
  color: #fff0bd;
  text-shadow: 0 1px 1px rgba(45, 21, 7, .56);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 159, .38),
    0 5px 12px rgba(35, 20, 8, .22);
}

.foe-world .left-rail {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 55;
  width: 310px;
  display: grid;
  gap: 8px;
}

.foe-world .brand {
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(96, 54, 24, .94), rgba(39, 20, 8, .92));
  color: #ffeab1;
}

.foe-world .brand > span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.foe-world .brand strong {
  font-size: 15px;
}

.foe-world .brand small {
  color: rgba(255, 235, 181, .7);
}

.foe-world .profile-card,
.foe-world .season-card,
.foe-world .missions {
  border-color: rgba(60, 31, 12, .4);
  background:
    linear-gradient(180deg, rgba(255, 238, 190, .92), rgba(200, 165, 103, .84));
  box-shadow: 0 10px 26px rgba(28, 17, 7, .22);
}

.foe-world .profile-card {
  min-height: 56px;
  padding: 9px;
}

.foe-world .avatar {
  width: 38px;
  height: 38px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255,255,255,.35), transparent 28%),
    linear-gradient(135deg, #78431d, #263c1d);
}

.foe-world .season-card {
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
  padding: 10px;
}

.foe-world .season-card p {
  grid-column: 1 / -1;
  padding: 8px 9px;
  background: rgba(87, 52, 23, .1);
  color: #3e321d;
}

.foe-world .missions {
  max-height: 188px;
  overflow: auto;
  padding: 10px;
}

.foe-world .right-panel {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 56;
  width: 352px;
  display: grid;
  gap: 10px;
}

.foe-world .detail-card {
  position: relative;
  min-height: 160px;
  padding: 16px 118px 16px 16px;
  border: 2px solid rgba(80, 42, 17, .5);
  border-radius: 7px 20px 7px 20px;
  background:
    linear-gradient(135deg, rgba(255, 245, 208, .98), rgba(218, 181, 113, .92)),
    var(--parchment);
  box-shadow:
    0 12px 34px rgba(30, 18, 8, .28),
    inset 0 0 0 1px rgba(255,255,255,.3);
}

.foe-world .detail-card::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -18px;
  width: 118px;
  height: 190px;
  border-radius: 54px 54px 16px 16px;
  background:
    radial-gradient(circle at 50% 20%, #ffd1a3 0 18px, transparent 19px),
    radial-gradient(circle at 42% 17%, #6d321e 0 34px, transparent 35px),
    linear-gradient(180deg, transparent 0 35px, #ffd1a3 36px 66px, #b46d31 67px 100%);
  filter: drop-shadow(0 10px 14px rgba(36, 18, 7, .26));
  pointer-events: none;
}

.foe-world .detail-card h2 {
  font-size: 24px;
  color: #3b2412;
}

.foe-world .detail-card p {
  color: #604829;
}

.foe-world .tabs {
  min-height: 0;
  max-height: 38vh;
  overflow: auto;
  border: 1px solid rgba(60, 31, 12, .42);
  background:
    linear-gradient(180deg, rgba(255, 238, 190, .9), rgba(188, 141, 75, .86));
  box-shadow: 0 12px 30px rgba(30, 18, 8, .23);
}

.foe-world .tabs nav {
  grid-template-columns: repeat(4, 1fr);
}

.foe-world .tabs nav button.active {
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.28), transparent 36%),
    linear-gradient(180deg, #78431d, #2f1a0c);
}

.foe-world .inventory-row,
.foe-world .market-row,
.foe-world .leader-row,
.foe-world .profile-row,
.foe-world .stat {
  background: rgba(255, 243, 207, .7);
}

.foe-world .welcome-modal {
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 210, 116, .2), transparent 26%),
    rgba(22, 13, 6, .74);
}

.foe-world .welcome-card {
  border-color: rgba(79, 41, 17, .5);
  background:
    linear-gradient(135deg, rgba(255, 242, 198, .98), rgba(202, 157, 88, .92));
}

.foe-world .toast {
  border-color: rgba(255, 226, 146, .2);
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.18), transparent 34%),
    linear-gradient(180deg, #5b3518, #241107);
  color: #ffedb5;
}

@keyframes graze {
  50% { transform: translate(18px, 7px) rotate(4deg); }
}

@keyframes birdPeck {
  50% { transform: translate(8px, 3px); opacity: .76; }
}

@keyframes tractorFoE {
  0% { transform: translate(0, 0) scale(.68) rotate(0); }
  34% { transform: translate(19vw, -12vh) scale(.68) rotate(-4deg); }
  50% { transform: translate(23vw, 2vh) scale(.68) rotate(8deg); }
  82% { transform: translate(-2vw, 8vh) scale(.68) rotate(176deg); }
  100% { transform: translate(0, 0) scale(.68) rotate(360deg); }
}

@media (max-width: 1180px) {
  .foe-world {
    overflow: auto;
  }

  .foe-world .farm-stage {
    position: relative;
    min-height: 920px;
  }

  .foe-world .topbar {
    width: calc(100vw - 38px);
  }

  .foe-world .left-rail,
  .foe-world .right-panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 12px;
  }

  .foe-world .left-rail {
    margin-top: -280px;
    max-width: 330px;
  }

  .foe-world .right-panel {
    max-width: 390px;
    margin-left: auto;
  }
}

@media (max-width: 820px) {
  .foe-world .farm-stage {
    min-height: 980px;
  }

  .foe-world .farm-map {
    min-height: 980px;
  }

  .foe-world .topbar {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    transform: none;
    margin: 8px;
    border-radius: 18px;
  }

  .foe-world .building-grid {
    left: 50%;
    top: 35%;
    transform: translate(-50%, -50%) scale(.82);
  }

  .foe-world .field-grid {
    left: 12px;
    top: 57%;
    width: calc(100% - 24px);
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    transform: none;
  }

  .foe-world .animal-zone {
    left: 18px;
    top: 42%;
  }

  .foe-world .right-panel,
  .foe-world .left-rail {
    margin: 10px;
  }
}

/* Farm-builder retning fra reference 2: avatar-HUD, kort-menu og runde actions. */
.foe-world .left-rail {
  top: 8px;
  bottom: auto;
  left: 8px;
  width: 58px;
  display: block;
  z-index: 72;
}

.foe-world .brand,
.foe-world .season-card,
.foe-world .missions {
  display: none;
}

.foe-world .profile-card {
  width: 58px;
  height: 58px;
  min-height: 0;
  padding: 4px;
  border: 2px solid rgba(40, 20, 8, .7);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 22%, rgba(255,255,255,.28), transparent 22%),
    linear-gradient(180deg, #c99148, #5a3217 70%, #2a1408);
  box-shadow:
    inset 0 2px 0 rgba(255, 232, 159, .28),
    0 7px 20px rgba(18, 10, 4, .34);
}

.foe-world .profile-card > div:not(.avatar) {
  display: none;
}

.foe-world .avatar {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 226, 143, .42);
  background:
    radial-gradient(circle at 50% 24%, #ffe0b5 0 15px, transparent 16px),
    radial-gradient(circle at 50% 14%, #782c18 0 19px, transparent 20px),
    linear-gradient(180deg, #c47b36 0 62%, #4d2b14 63%);
  color: #fff2bd;
  font-size: 0;
}

.foe-world .avatar::after {
  content: "3";
  position: absolute;
  left: -8px;
  bottom: -8px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 226, 143, .5);
  border-radius: 50%;
  background: linear-gradient(180deg, #8b5828, #32180a);
  color: #ffeab1;
  font-size: 11px;
  font-weight: 950;
}

.foe-world .topbar {
  left: 63px;
  right: 8px;
  width: auto;
  min-height: 38px;
  transform: none;
  justify-content: flex-start;
  border-radius: 0 0 0 16px;
}

.foe-world .topbar::before {
  display: none;
}

.foe-world .topbar::after {
  right: -6px;
  top: 2px;
  width: 34px;
  height: 34px;
}

.foe-world .resource-pill {
  min-width: 84px;
  min-height: 30px;
}

.foe-world .quick-actions {
  margin-left: auto;
}

.foe-world .quick-actions button {
  min-height: 30px;
  padding-inline: 10px;
}

.foe-world .farm-stage::before {
  background:
    radial-gradient(ellipse at 12% 26%, rgba(23, 74, 33, .72) 0 7%, transparent 18%),
    radial-gradient(ellipse at 11% 76%, rgba(21, 68, 32, .68) 0 8%, transparent 20%),
    radial-gradient(ellipse at 88% 42%, rgba(27, 78, 32, .58) 0 7%, transparent 18%),
    radial-gradient(ellipse at 81% 81%, rgba(21, 69, 30, .66) 0 8%, transparent 22%),
    radial-gradient(ellipse at 48% 28%, rgba(119, 151, 62, .34) 0 6%, transparent 22%),
    repeating-linear-gradient(22deg, rgba(255,255,255,.025) 0 4px, transparent 4px 18px);
}

.foe-world .water-channel {
  top: -5%;
  right: -3%;
  width: 26vw;
  height: 28vh;
  border-radius: 0 0 34% 62%;
}

.foe-world .building-grid {
  top: 36%;
  width: 520px;
  height: 360px;
}

.foe-world .building:nth-child(1) {
  left: 202px;
  top: 22px;
  transform: scale(1.34);
}

.foe-world .building:nth-child(2) {
  left: 346px;
  top: 106px;
  transform: scale(.92);
}

.foe-world .building:nth-child(3) {
  left: 74px;
  top: 176px;
  transform: scale(.94);
}

.foe-world .building:nth-child(4) {
  left: 362px;
  top: 232px;
  transform: scale(.95);
}

.foe-world .building:nth-child(5) {
  left: 216px;
  top: 162px;
  transform: scale(1.02);
}

.foe-world .building:nth-child(6) {
  left: 76px;
  top: 76px;
  transform: scale(.9);
}

.foe-world .building:nth-child(7) {
  left: 190px;
  top: 282px;
  transform: scale(.82);
}

.foe-world .building:nth-child(8) {
  left: 360px;
  top: 28px;
  transform: scale(.82);
}

.foe-world .building:nth-child(1):hover { transform: translateY(-5px) scale(1.34); }
.foe-world .building:nth-child(2):hover { transform: translateY(-5px) scale(.92); }
.foe-world .building:nth-child(3):hover { transform: translateY(-5px) scale(.94); }
.foe-world .building:nth-child(4):hover { transform: translateY(-5px) scale(.95); }
.foe-world .building:nth-child(5):hover { transform: translateY(-5px) scale(1.02); }
.foe-world .building:nth-child(6):hover { transform: translateY(-5px) scale(.9); }
.foe-world .building:nth-child(7):hover { transform: translateY(-5px) scale(.82); }
.foe-world .building:nth-child(8):hover { transform: translateY(-5px) scale(.82); }

.foe-world .farm-road {
  top: 31%;
  height: 390px;
  width: 54px;
}

.foe-world .path-north {
  left: 47%;
  top: 30%;
  width: 190px;
}

.foe-world .path-west {
  left: 34%;
  top: 44%;
  width: 260px;
}

.foe-world .path-east {
  left: 52%;
  top: 44%;
  width: 250px;
}

.foe-world .path-south {
  left: 44%;
  top: 57%;
  width: 205px;
}

.foe-world .field-grid {
  left: 25%;
  top: 59%;
  width: 360px;
  grid-template-columns: repeat(3, 104px);
  gap: 10px;
}

.foe-world .field-tile {
  min-height: 84px;
}

.foe-world .animal-zone {
  left: 43%;
  top: 64%;
  width: 210px;
  height: 118px;
}

.foe-world .right-panel {
  right: 12px;
  top: 66px;
  bottom: auto;
  width: 320px;
  opacity: .96;
}

.foe-world .detail-card {
  min-height: 128px;
  padding: 13px 100px 13px 13px;
}

.foe-world .detail-card h2 {
  font-size: 21px;
}

.foe-world .detail-card::after {
  width: 98px;
  height: 154px;
}

.foe-world .tabs {
  max-height: 30vh;
}

.build-dock {
  position: fixed;
  left: 10px;
  bottom: 10px;
  z-index: 74;
  width: 354px;
  border: 2px solid rgba(37, 18, 7, .72);
  border-radius: 11px 20px 11px 20px;
  background:
    linear-gradient(180deg, rgba(102, 61, 30, .96), rgba(35, 18, 8, .98));
  box-shadow:
    inset 0 2px 0 rgba(255, 232, 159, .14),
    0 12px 34px rgba(16, 9, 4, .4);
}

.build-tabs {
  display: flex;
  gap: 4px;
  padding: 7px 8px 0;
}

.build-tabs button {
  width: 38px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 11, 4, .65);
  border-radius: 8px 8px 2px 2px;
  background:
    radial-gradient(circle at 28% 16%, rgba(255,255,255,.24), transparent 34%),
    linear-gradient(180deg, #9b6a35, #3c1f0d);
  color: #ffeab1;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 232, 159, .28);
}

.build-tabs button.active {
  color: #2e190c;
  background:
    linear-gradient(180deg, #f0d08a, #b9813b);
}

.build-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 8px;
}

.build-cards button {
  min-height: 94px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 3px;
  padding: 7px 5px 6px;
  border: 1px solid rgba(53, 27, 11, .55);
  border-radius: 8px;
  background:
    radial-gradient(circle at 35% 18%, rgba(255,255,255,.36), transparent 36%),
    linear-gradient(180deg, #fae6b9, #c78f4d 72%, #74401c);
  color: #34200f;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.38),
    0 6px 12px rgba(20, 10, 4, .22);
}

.build-cards strong {
  font-size: 12px;
  font-weight: 950;
}

.build-cards small {
  min-width: 36px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #5ba64a;
  color: #fff8d6;
  font-size: 10px;
  font-weight: 950;
}

.mini-building {
  position: relative;
  width: 50px;
  height: 43px;
  display: block;
  filter: drop-shadow(6px 8px 5px rgba(45, 24, 9, .25));
}

.mini-building::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 7px;
  bottom: 4px;
  height: 25px;
  border-radius: 5px;
  background: linear-gradient(135deg, #d2a05c, #7c421e);
}

.mini-building::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 3px;
  top: 5px;
  height: 22px;
  clip-path: polygon(10% 100%, 50% 0, 92% 100%);
  background: linear-gradient(135deg, #7f2f22, #c96335);
}

.mini-building.field::before {
  inset: 9px 3px 4px;
  height: auto;
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, #5e371c 0 6px, #b38335 6px 10px);
}

.mini-building.field::after {
  display: none;
}

.mini-building.well::before {
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 27px;
  border-radius: 50%;
  background: radial-gradient(circle, #79b9c7 0 36%, #6b4b2d 38% 62%, #342011 63%);
}

.mini-building.well::after {
  left: 8px;
  right: 8px;
  top: 4px;
  height: 21px;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.round-actions {
  position: fixed;
  right: 16px;
  bottom: 14px;
  z-index: 74;
  display: flex;
  gap: 10px;
  align-items: center;
}

.round-actions button {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(37, 18, 7, .72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 18%, rgba(255,255,255,.28), transparent 32%),
    linear-gradient(180deg, #b57a38, #4a2610 74%, #1d0d05);
  color: #ffeab1;
  font-size: 22px;
  box-shadow:
    inset 0 2px 0 rgba(255, 232, 159, .2),
    0 8px 22px rgba(18, 10, 4, .36);
}

.round-actions button:nth-child(2)::after,
.round-actions button:nth-child(4)::after {
  content: "!";
  position: absolute;
  right: -2px;
  top: -4px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d54534;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

@media (max-width: 1180px) {
  .foe-world .left-rail {
    position: fixed;
    left: 8px;
    top: 8px;
    width: 58px;
    margin: 0;
  }

  .foe-world .right-panel {
    position: relative;
    right: auto;
    top: auto;
    width: min(360px, calc(100vw - 20px));
    margin: 10px 10px 112px auto;
  }
}

@media (max-width: 820px) {
  .build-dock {
    width: calc(100vw - 20px);
  }

  .round-actions {
    right: 10px;
    bottom: 132px;
  }

  .round-actions button {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .foe-world .topbar {
    margin-left: 72px;
  }

  .foe-world .building-grid {
    transform: translate(-50%, -50%) scale(.72);
  }

  .foe-world .animal-zone {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* 1:1 farm-builder finpudsning: kortet er primært, paneler er sekundære overlays. */
.foe-world::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  border: 6px solid rgba(28, 13, 5, .9);
  box-shadow:
    inset 0 0 0 2px rgba(156, 100, 44, .35),
    inset 0 0 44px rgba(17, 9, 4, .38);
}

.foe-world .quick-actions {
  display: none;
}

.foe-world .right-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}

.foe-world.panel-open .right-panel {
  opacity: .98;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.panel-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(62, 31, 12, .52);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.25), transparent 32%),
    linear-gradient(180deg, #8d5729, #321709);
  color: #ffeab1;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 232, 159, .22);
}

.foe-world .detail-card {
  padding-right: 106px;
}

.foe-world .building-label,
.foe-world .field-label {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
}

.foe-world .field-label {
  left: 50%;
  position: absolute;
  top: -20px;
}

.foe-world .building:hover .building-label,
.foe-world .field-tile:hover .field-label,
.foe-world .building.ready .building-label,
.foe-world .field-tile.ready-pulse .field-label {
  opacity: .96;
  transform: translateX(-50%) translateY(0);
}

.foe-world .growth-meter,
.foe-world .timer-badge {
  opacity: 0;
  transition: opacity .16s ease;
}

.foe-world .field-tile:hover .growth-meter,
.foe-world .field-tile:hover .timer-badge,
.foe-world .building:hover .timer-badge,
.foe-world .ready-pulse .timer-badge {
  opacity: 1;
}

.foe-world .campfire {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 76px;
  height: 76px;
  transform: translate(-50%, -50%);
  z-index: 14;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, #ffe483 0 10%, #f18b22 11% 22%, #bd3924 23% 32%, transparent 33%),
    radial-gradient(circle at 50% 50%, rgba(255, 205, 85, .5), transparent 52%),
    radial-gradient(circle at 50% 62%, #8a7a62 0 28%, #5b5141 29% 40%, transparent 41%);
  filter: drop-shadow(0 10px 9px rgba(33, 19, 7, .22));
}

.foe-world .campfire::before,
.foe-world .campfire::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 41px;
  width: 42px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b321a, #a56a34);
}

.foe-world .campfire::before {
  transform: rotate(24deg);
}

.foe-world .campfire::after {
  transform: rotate(-24deg);
}

.foe-world .market-flag {
  position: absolute;
  left: 58%;
  top: 36%;
  z-index: 15;
  width: 34px;
  height: 56px;
  filter: drop-shadow(5px 8px 5px rgba(22, 17, 8, .22));
}

.foe-world .market-flag::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 4px;
  height: 48px;
  border-radius: 99px;
  background: #5a351b;
}

.foe-world .market-flag::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 5px;
  width: 22px;
  height: 18px;
  border-radius: 2px 8px 8px 2px;
  background:
    radial-gradient(circle at 70% 50%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(135deg, #d2a43c, #8e5c1d);
}

.royal-banner {
  position: fixed;
  right: 14px;
  top: 38px;
  z-index: 75;
  width: 34px;
  height: 68px;
  border: 1px solid rgba(31, 15, 6, .68);
  border-radius: 0 0 16px 16px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.24), transparent 32%),
    linear-gradient(180deg, #426d36, #18431f 78%, #0d2713);
  color: #d9b759;
  font-size: 18px;
  font-weight: 950;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 7px 16px rgba(17, 9, 4, .26);
}

.royal-banner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 16px;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  background: #18431f;
}

.bottom-handle {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 74;
  width: 66px;
  height: 26px;
  transform: translateX(-50%);
  border: 1px solid rgba(30, 15, 6, .65);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.25), transparent 34%),
    linear-gradient(180deg, #7b4a23, #241107);
  color: #ffeab1;
  font-weight: 950;
  box-shadow: 0 -4px 16px rgba(18, 10, 4, .28);
}

.foe-world .build-dock {
  width: 292px;
}

.foe-world .build-tabs button {
  width: 34px;
}

.foe-world .build-cards {
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.foe-world .build-cards button {
  min-height: 86px;
  padding: 6px 4px;
}

.foe-world .mini-building {
  width: 43px;
  height: 37px;
}

.foe-world .round-actions {
  right: 18px;
  bottom: 14px;
}

.foe-world .round-actions button {
  width: 50px;
  height: 50px;
}

.foe-world .topbar {
  height: 40px;
  overflow: visible;
}

.foe-world .resource-pill {
  position: relative;
  padding-left: 30px;
}

.foe-world .resource-pill::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 25%, rgba(255,255,255,.42), transparent 24%),
    linear-gradient(135deg, #d7a13d, #6c3b16);
  box-shadow: inset 0 0 0 1px rgba(255, 231, 149, .22);
}

.foe-world .resource-pill:nth-child(2)::before { background: linear-gradient(135deg, #a1784c, #4b2b17); border-radius: 4px; }
.foe-world .resource-pill:nth-child(3)::before { background: linear-gradient(135deg, #9c9a8a, #4b4c42); }
.foe-world .resource-pill:nth-child(4)::before { background: linear-gradient(135deg, #d5b04a, #6a4a18); border-radius: 30% 70% 46% 54%; }
.foe-world .resource-pill:nth-child(5)::before { background: linear-gradient(135deg, #7fb7c2, #245f75); }
.foe-world .resource-pill:nth-child(6)::before { background: linear-gradient(135deg, #f1d076, #7b4a1f); }

@media (max-width: 820px) {
  .foe-world .right-panel {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .foe-world .build-dock {
    width: calc(100vw - 20px);
  }
}

/* Grafikløft v5: mere håndmalet terræn, bedre sprites og flere naturdetaljer. */
.foe-world .farm-map {
  background:
    radial-gradient(circle at 48% 45%, rgba(246, 217, 132, .2) 0 7%, transparent 18%),
    radial-gradient(ellipse at 24% 58%, rgba(25, 73, 31, .28) 0 12%, transparent 30%),
    radial-gradient(ellipse at 78% 65%, rgba(28, 78, 33, .28) 0 12%, transparent 30%),
    radial-gradient(circle at 37% 72%, rgba(255, 226, 132, .1) 0 5%, transparent 15%),
    repeating-radial-gradient(circle at 42% 48%, rgba(255,255,255,.026) 0 1px, transparent 1px 19px),
    linear-gradient(140deg, #7eaf4c 0%, #689742 43%, #537b36 100%);
}

.foe-world .farm-map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .42;
  background-image:
    radial-gradient(circle at 12% 21%, rgba(255, 246, 166, .36) 0 1px, transparent 2px),
    radial-gradient(circle at 16% 67%, rgba(255, 234, 123, .28) 0 1px, transparent 2px),
    radial-gradient(circle at 71% 31%, rgba(255, 255, 255, .24) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 77%, rgba(255, 230, 132, .26) 0 1px, transparent 2px),
    linear-gradient(72deg, transparent 0 47%, rgba(255,255,255,.045) 48% 49%, transparent 50%);
  background-size: 92px 82px, 138px 118px, 160px 130px, 112px 106px, 44px 44px;
  mix-blend-mode: soft-light;
}

.foe-world .farm-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 0 36%, rgba(27, 38, 15, .18) 75%, rgba(17, 22, 8, .28) 100%);
}

.foe-world .path,
.foe-world .farm-road {
  background:
    radial-gradient(circle at 18% 42%, rgba(122, 91, 49, .18) 0 4px, transparent 5px),
    radial-gradient(circle at 72% 58%, rgba(255, 232, 158, .18) 0 3px, transparent 4px),
    linear-gradient(90deg, rgba(74, 48, 24, .16), rgba(211, 180, 118, .78), rgba(74, 48, 24, .16));
  background-size: 42px 32px, 36px 26px, auto;
}

.foe-world .water-channel {
  background:
    radial-gradient(ellipse at 26% 78%, rgba(255, 232, 159, .95) 0 13%, rgba(218, 185, 111, .9) 14% 24%, transparent 25%),
    radial-gradient(ellipse at 42% 64%, rgba(255,255,255,.38), transparent 17%),
    radial-gradient(ellipse at 73% 42%, rgba(115, 218, 225, .32), transparent 21%),
    repeating-linear-gradient(155deg, rgba(255,255,255,.18) 0 1px, transparent 1px 19px),
    linear-gradient(135deg, #66c2bd, #126f86 58%, #0b465f);
  animation: lakeShimmer 7s ease-in-out infinite;
}

.foe-world .meadow,
.foe-world .flowers,
.foe-world .reeds,
.foe-world .cart,
.foe-world .stump,
.foe-world .shore-bird {
  position: absolute;
  pointer-events: none;
}

.foe-world .meadow {
  width: 130px;
  height: 70px;
  opacity: .82;
  background:
    radial-gradient(ellipse at 12% 74%, #395f29 0 9px, transparent 10px),
    radial-gradient(ellipse at 28% 56%, #477936 0 8px, transparent 9px),
    radial-gradient(ellipse at 48% 70%, #2f5527 0 11px, transparent 12px),
    radial-gradient(ellipse at 72% 54%, #5d8e3c 0 9px, transparent 10px),
    radial-gradient(ellipse at 88% 73%, #3a6a2d 0 7px, transparent 8px);
  filter: drop-shadow(7px 9px 5px rgba(18, 28, 10, .16));
}

.foe-world .meadow-a { left: 27%; top: 28%; transform: rotate(-8deg); }
.foe-world .meadow-b { left: 60%; top: 58%; transform: rotate(12deg) scale(.84); }
.foe-world .meadow-c { left: 75%; top: 23%; transform: rotate(-16deg) scale(.72); }

.foe-world .flowers {
  width: 96px;
  height: 54px;
  opacity: .92;
  background-image:
    radial-gradient(circle at 14px 17px, #f7e36d 0 2px, transparent 3px),
    radial-gradient(circle at 34px 29px, #f8f1b0 0 2px, transparent 3px),
    radial-gradient(circle at 58px 14px, #e8a3b1 0 2px, transparent 3px),
    radial-gradient(circle at 78px 34px, #fff4a4 0 2px, transparent 3px),
    radial-gradient(ellipse at 50% 78%, rgba(44, 93, 33, .45), transparent 55%);
  background-size: 96px 54px;
  filter: drop-shadow(4px 6px 3px rgba(20, 31, 11, .14));
}

.foe-world .flowers-a { left: 33%; top: 36%; }
.foe-world .flowers-b { left: 70%; top: 41%; transform: scale(.8); }
.foe-world .flowers-c { left: 17%; top: 64%; transform: scale(.72); }

.foe-world .reeds {
  width: 80px;
  height: 72px;
  background:
    linear-gradient(82deg, transparent 0 46%, #39662d 47% 50%, transparent 51%),
    linear-gradient(98deg, transparent 0 48%, #54772f 49% 52%, transparent 53%),
    linear-gradient(76deg, transparent 0 44%, #7b612a 45% 48%, transparent 49%);
  background-size: 14px 70px, 19px 64px, 24px 66px;
  filter: drop-shadow(5px 7px 4px rgba(16, 34, 17, .2));
}

.foe-world .reeds-a { right: 13%; top: 13%; transform: rotate(-12deg); }
.foe-world .reeds-b { right: 6%; top: 27%; transform: rotate(14deg) scale(.82); }

.foe-world .cart {
  left: 36%;
  top: 51%;
  z-index: 14;
  width: 58px;
  height: 35px;
  border-radius: 10px 8px 6px 8px;
  background:
    linear-gradient(90deg, transparent 0 8px, #5b351b 9px 12px, transparent 13px),
    linear-gradient(180deg, #a66a31, #5d341a);
  box-shadow: 9px 11px 8px rgba(26, 19, 9, .2);
  transform: rotate(-13deg);
}

.foe-world .cart::before,
.foe-world .cart::after {
  content: "";
  position: absolute;
  bottom: -7px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle, #8d6534 0 30%, #28170a 31% 60%, #7c552b 61%);
}

.foe-world .cart::before { left: 7px; }
.foe-world .cart::after { right: 8px; }

.foe-world .stump {
  left: 69%;
  top: 69%;
  z-index: 9;
  width: 38px;
  height: 28px;
  border-radius: 50% 50% 42% 42%;
  background:
    radial-gradient(ellipse at 50% 28%, #d29a54 0 24%, #72421d 25% 48%, transparent 49%),
    linear-gradient(180deg, #805023, #4a2a13);
  box-shadow: 7px 8px 5px rgba(20, 16, 8, .18);
}

.foe-world .shore-bird {
  right: 17%;
  top: 8%;
  z-index: 7;
  width: 50px;
  height: 22px;
  background:
    radial-gradient(circle at 12px 12px, #ece5d1 0 4px, transparent 5px),
    radial-gradient(circle at 29px 8px, #ece5d1 0 4px, transparent 5px),
    linear-gradient(110deg, transparent 0 45%, rgba(255,255,255,.7) 46% 50%, transparent 51%);
  animation: birdPeck 3.8s ease-in-out infinite;
}

.foe-world .tree {
  filter:
    drop-shadow(11px 15px 7px rgba(20, 29, 10, .26))
    saturate(1.12);
}

.foe-world .tree::after {
  background:
    radial-gradient(circle at 32% 24%, rgba(206, 239, 116, .76), transparent 21%),
    radial-gradient(circle at 63% 28%, rgba(149, 205, 82, .72), transparent 23%),
    radial-gradient(circle at 40% 68%, rgba(22, 70, 25, .42), transparent 35%),
    linear-gradient(135deg, #78ae42, #245b29 72%);
  box-shadow: inset -12px -14px 18px rgba(12, 44, 18, .22);
}

.foe-world .building {
  filter: drop-shadow(12px 18px 12px rgba(31, 22, 10, .24));
}

.foe-world .building-face {
  background:
    linear-gradient(90deg, rgba(255,255,255,.2), transparent 32%, rgba(0,0,0,.14)),
    repeating-linear-gradient(0deg, rgba(74, 39, 19, .14) 0 3px, transparent 3px 10px),
    linear-gradient(145deg, #e2a461, #8e4b25);
}

.foe-world .building-roof {
  background:
    repeating-linear-gradient(100deg, rgba(255, 232, 151, .25) 0 4px, transparent 4px 9px),
    linear-gradient(135deg, #7d2e22, #c76636);
}

.foe-world .building-door {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 18px;
  width: 24px;
  height: 31px;
  transform: translateX(-50%);
  border-radius: 10px 10px 3px 3px;
  background:
    radial-gradient(circle at 75% 48%, #e1b662 0 2px, transparent 3px),
    linear-gradient(90deg, rgba(255,255,255,.08), transparent 35%),
    linear-gradient(180deg, #70411e, #30170a);
  box-shadow: inset 0 0 0 2px rgba(47, 23, 10, .24);
}

.foe-world .building-detail {
  position: absolute;
  z-index: 4;
  pointer-events: none;
}

.foe-world .detail-a {
  left: 15px;
  bottom: 13px;
  width: 20px;
  height: 15px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, #8e5c2b 0 3px, #5b3519 3px 5px);
  box-shadow: 3px 5px 4px rgba(23, 14, 6, .14);
}

.foe-world .detail-b {
  right: 17px;
  bottom: 15px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #5d3921 0 28%, #b48748 29% 54%, #4a2a15 55%);
}

.foe-world .building-barn .building-face,
.foe-world .building-chicken-coop .building-face,
.foe-world .building-cow-stable .building-face {
  background:
    repeating-linear-gradient(90deg, rgba(90, 48, 22, .18) 0 5px, transparent 5px 11px),
    linear-gradient(145deg, #b16b36, #67351d);
}

.foe-world .building-barn .building-roof,
.foe-world .building-cow-stable .building-roof {
  background:
    repeating-linear-gradient(100deg, rgba(255, 235, 160, .23) 0 5px, transparent 5px 10px),
    linear-gradient(135deg, #c18a45, #6c401f);
}

.foe-world .building-silo .building-face {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.15) 0 3px, transparent 3px 12px),
    linear-gradient(90deg, #ded8bd, #8f9789 52%, #5d655e);
}

.foe-world .building-mill .building-face::before {
  filter: drop-shadow(0 4px 4px rgba(42, 26, 11, .18));
}

.foe-world .building-mill .building-face::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -24px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #6e4a24;
}

.foe-world .building-dairy .building-face {
  background:
    radial-gradient(circle at 22% 32%, rgba(255,255,255,.35), transparent 20%),
    linear-gradient(145deg, #eef2df, #95ada2);
}

.foe-world .building-machine-house .building-face {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 4px, transparent 4px 12px),
    linear-gradient(145deg, #9fa899, #575f52);
}

.foe-world .building-trade-office .building-face {
  background:
    radial-gradient(circle at 70% 32%, rgba(255, 230, 136, .38), transparent 18%),
    linear-gradient(145deg, #e7c06f, #8f5e2b);
}

.foe-world .window-a,
.foe-world .window-b {
  background:
    radial-gradient(circle at 35% 26%, rgba(255,255,255,.9), transparent 18%),
    linear-gradient(145deg, #ffe58e, #4d8fa2);
  box-shadow:
    inset 0 0 0 2px rgba(85, 46, 27, .22),
    0 0 12px rgba(255, 224, 126, .24);
}

.foe-world .field-tile {
  border: 1px solid rgba(84, 50, 20, .36);
  background:
    linear-gradient(0deg, rgba(65, 36, 20, .92), rgba(126, 78, 37, .95)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 2px, transparent 2px 11px),
    var(--soil);
}

.foe-world .field-fence {
  position: absolute;
  inset: -2px;
  z-index: 5;
  pointer-events: none;
  border: 5px solid transparent;
  border-image: repeating-linear-gradient(90deg, #8c5b2b 0 10px, #4f2d14 10px 14px) 7;
  opacity: .92;
  filter: drop-shadow(2px 4px 2px rgba(29, 20, 8, .18));
}

.foe-world .field-sign {
  position: absolute;
  left: -9px;
  top: 25px;
  z-index: 6;
  width: 18px;
  height: 28px;
  background:
    linear-gradient(90deg, transparent 0 7px, #5a351b 8px 11px, transparent 12px),
    linear-gradient(180deg, transparent 0 4px, #af7a35 5px 17px, transparent 18px);
  transform: rotate(8deg);
  filter: drop-shadow(2px 4px 2px rgba(22, 16, 8, .17));
}

.foe-world .crop-bed {
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,.08), transparent 16%),
    repeating-linear-gradient(92deg, rgba(54, 30, 17, .95) 0 8px, rgba(134, 86, 41, .95) 8px 15px);
}

.foe-world .stage-growing .crop-sprite,
.foe-world .stage-ready .crop-sprite {
  background-size: 18px 18px;
  background-image:
    linear-gradient(80deg, transparent 38%, rgba(37, 120, 45, .98) 42% 48%, transparent 52%),
    linear-gradient(100deg, transparent 42%, var(--crop-color) 44% 54%, transparent 58%),
    radial-gradient(circle at 50% 22%, rgba(255,255,255,.35) 0 1px, transparent 3px);
}

.foe-world .animal-zone {
  border: 0;
  background:
    linear-gradient(90deg, rgba(114, 77, 38, .55) 0 3px, transparent 3px 31px),
    linear-gradient(0deg, rgba(114, 77, 38, .42) 0 3px, transparent 3px 31px),
    radial-gradient(circle at 28% 36%, rgba(255,255,255,.16), transparent 24%),
    linear-gradient(145deg, rgba(115, 164, 67, .86), rgba(68, 116, 50, .86));
  background-size: 34px 100%, 100% 34px, auto, auto;
}

.foe-world .animal-zone::before {
  inset: 7px;
  border: 5px solid rgba(110, 72, 35, .78);
  border-image: repeating-linear-gradient(90deg, #9a6a35 0 12px, #583116 12px 16px) 8;
}

.foe-world .animal-body {
  box-shadow:
    inset -9px -5px 0 rgba(0, 0, 0, .1),
    inset 5px 3px 0 rgba(255,255,255,.18);
}

.foe-world .animal.cow .animal-body {
  background:
    radial-gradient(circle at 42% 45%, #2f2a23 0 5px, transparent 6px),
    radial-gradient(circle at 68% 58%, #2f2a23 0 4px, transparent 5px),
    radial-gradient(circle at 28% 24%, rgba(255,255,255,.8), transparent 22%),
    #fff5df;
}

.foe-world .animal.chicken .animal-body {
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.85), transparent 20%),
    #fff2ca;
}

.foe-world .campfire {
  animation: fireFlicker 1.2s ease-in-out infinite;
}

.foe-world .campfire i {
  display: none;
}

.foe-world .build-cards button {
  background:
    radial-gradient(circle at 35% 18%, rgba(255,255,255,.42), transparent 36%),
    linear-gradient(180deg, #fff0c6, #d79b54 68%, #78421d);
}

.foe-world .round-actions button,
.royal-banner,
.bottom-handle,
.foe-world .build-dock,
.foe-world .topbar {
  filter: drop-shadow(0 6px 8px rgba(16, 9, 4, .24));
}

@keyframes lakeShimmer {
  50% { filter: saturate(1.18) brightness(1.08); }
}

@keyframes fireFlicker {
  0%, 100% { filter: drop-shadow(0 10px 9px rgba(33, 19, 7, .22)) brightness(1); }
  50% { filter: drop-shadow(0 10px 16px rgba(217, 89, 20, .32)) brightness(1.18); }
}

/* Grafikløft v6: lokale SVG-sprites som egentlige spilassets. */
.foe-world .building-art {
  position: absolute;
  left: -22px;
  right: -22px;
  top: -28px;
  bottom: -8px;
  z-index: 7;
  pointer-events: none;
  background: center bottom / contain no-repeat;
  filter:
    drop-shadow(12px 18px 10px rgba(26, 18, 8, .26))
    saturate(1.08)
    contrast(1.03);
  transform-origin: 50% 100%;
  transition: transform .16s ease, filter .16s ease;
}

.foe-world .building:hover .building-art,
.foe-world .building.ready .building-art {
  transform: translateY(-3px);
  filter:
    drop-shadow(14px 22px 12px rgba(26, 18, 8, .3))
    saturate(1.14)
    contrast(1.05)
    brightness(1.04);
}

.foe-world .building-barn .building-art {
  background-image: url("/assets/farmhouse.svg");
}

.foe-world .building-silo .building-art {
  background-image: url("/assets/silo.svg");
}

.foe-world .building-chicken-coop .building-art {
  background-image: url("/assets/coop.svg");
}

.foe-world .building-cow-stable .building-art {
  background-image: url("/assets/stable.svg");
}

.foe-world .building-mill .building-art {
  background-image: url("/assets/mill.svg");
}

.foe-world .building-dairy .building-art {
  background-image: url("/assets/dairy.svg");
}

.foe-world .building-machine-house .building-art {
  background-image: url("/assets/barn.svg");
}

.foe-world .building-trade-office .building-art {
  background-image: url("/assets/trade.svg");
}

.foe-world .building-roof,
.foe-world .building-face,
.foe-world .building-door,
.foe-world .building-window,
.foe-world .building-detail {
  opacity: 0;
}

.foe-world .building-smoke {
  z-index: 8;
  right: 36px;
  top: -18px;
}

.foe-world .building-label,
.foe-world .building-level,
.foe-world .building .timer-badge {
  z-index: 10;
}

.foe-world .building-level {
  top: -2px;
  right: -3px;
  border: 1px solid rgba(80, 42, 17, .46);
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.38), transparent 30%),
    linear-gradient(180deg, #f0d98d, #9a622a);
  color: #3b200e;
}

.foe-world .building-shadow {
  left: -4px;
  right: -4px;
  bottom: -2px;
  height: 34px;
  background: rgba(22, 17, 8, .24);
  filter: blur(9px);
}

.foe-world .field-tile {
  isolation: isolate;
  background:
    radial-gradient(circle at 28% 16%, rgba(255,255,255,.12), transparent 24%),
    linear-gradient(145deg, #87542a, #45230f);
}

.foe-world .field-tile::before {
  content: "";
  position: absolute;
  inset: -8px -8px -4px;
  z-index: 1;
  pointer-events: none;
  background: url("/assets/field.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(7px 11px 7px rgba(22, 16, 8, .22));
}

.foe-world .field-shadow {
  z-index: 0;
}

.foe-world .field-fence,
.foe-world .field-sign,
.foe-world .crop-bed,
.foe-world .field-label,
.foe-world .growth-meter,
.foe-world .timer-badge {
  z-index: 3;
}

.foe-world .crop-bed {
  inset: 19px 17px 16px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.08), transparent 16%),
    repeating-linear-gradient(94deg, rgba(54, 30, 17, .72) 0 7px, rgba(137, 89, 42, .76) 7px 13px);
  box-shadow: inset 0 3px 8px rgba(34, 17, 6, .24);
}

.foe-world .field-fence {
  opacity: .42;
  border-width: 3px;
}

.foe-world .field-sign {
  z-index: 4;
}

.foe-world .stage-empty .crop-bed {
  opacity: .58;
}

.foe-world .stage-sprout .crop-sprite,
.foe-world .stage-growing .crop-sprite,
.foe-world .stage-ready .crop-sprite {
  filter:
    drop-shadow(0 4px 2px rgba(16, 42, 13, .18))
    saturate(1.12);
}

.foe-world .tree::after {
  filter:
    drop-shadow(0 3px 0 rgba(255,255,255,.06))
    saturate(1.16);
}

.foe-world .tree-a::after,
.foe-world .tree-c::after,
.foe-world .tree-h::after,
.foe-world .tree-l::after {
  background:
    radial-gradient(circle at 30% 24%, rgba(220, 248, 132, .82), transparent 21%),
    radial-gradient(circle at 64% 31%, rgba(137, 204, 72, .78), transparent 24%),
    radial-gradient(circle at 43% 72%, rgba(18, 66, 25, .48), transparent 35%),
    linear-gradient(135deg, #82ba45, #1f5427 72%);
}

.foe-world .tree-b::after,
.foe-world .tree-g::after,
.foe-world .tree-j::after {
  border-radius: 48% 52% 30% 32%;
  clip-path: polygon(50% 0, 88% 40%, 70% 40%, 95% 78%, 61% 72%, 50% 100%, 38% 72%, 5% 78%, 30% 40%, 12% 40%);
  background:
    radial-gradient(circle at 38% 26%, rgba(202, 230, 117, .52), transparent 22%),
    linear-gradient(135deg, #497f39, #174522 78%);
}

.foe-world .water-channel::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 9%;
  bottom: 13%;
  height: 26%;
  border-radius: 50%;
  background:
    repeating-linear-gradient(168deg, rgba(255,255,255,.2) 0 2px, transparent 2px 18px);
  opacity: .5;
  filter: blur(.4px);
  animation: waterLines 5.5s ease-in-out infinite;
}

.foe-world .animal-zone {
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.12),
    inset 0 -20px 26px rgba(24, 62, 24, .12),
    16px 22px 18px rgba(24, 22, 10, .18);
}

.foe-world .animal {
  filter: drop-shadow(4px 7px 4px rgba(19, 22, 9, .2));
}

.foe-world .campfire {
  background:
    radial-gradient(circle at 50% 46%, #fff2a2 0 7%, #f6a331 8% 18%, #bd3924 19% 27%, transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(255, 205, 85, .58), transparent 50%),
    radial-gradient(circle at 50% 62%, #9b8a6e 0 27%, #5b5141 28% 41%, transparent 42%);
}

.foe-world .topbar,
.foe-world .build-dock,
.foe-world .round-actions button {
  backdrop-filter: saturate(1.05);
}

@keyframes waterLines {
  50% { transform: translate(-5px, 3px); opacity: .72; }
}

/* Grafikløft v7: reference-nær spriteverden med tættere vegetation og bedre dyr. */
.foe-world {
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 224, 136, .18), transparent 26%),
    linear-gradient(180deg, #789d43, #557f35 62%, #314a25 100%);
}

.foe-world .farm-stage {
  background:
    radial-gradient(circle at 49% 43%, rgba(238, 206, 116, .18) 0 9%, transparent 24%),
    radial-gradient(ellipse at 20% 22%, rgba(24, 64, 29, .36), transparent 23%),
    radial-gradient(ellipse at 86% 54%, rgba(22, 67, 28, .36), transparent 25%),
    linear-gradient(180deg, #7ba74a 0%, #628f3d 48%, #496d32 100%);
}

.foe-world .farm-stage::before {
  opacity: .95;
  background:
    radial-gradient(ellipse at 13% 25%, rgba(23, 74, 33, .78) 0 8%, transparent 19%),
    radial-gradient(ellipse at 9% 79%, rgba(20, 64, 31, .76) 0 9%, transparent 21%),
    radial-gradient(ellipse at 90% 43%, rgba(22, 73, 31, .7) 0 9%, transparent 21%),
    radial-gradient(ellipse at 80% 84%, rgba(19, 64, 30, .72) 0 10%, transparent 23%),
    radial-gradient(ellipse at 49% 28%, rgba(132, 157, 66, .35) 0 7%, transparent 22%),
    radial-gradient(circle at 50% 47%, rgba(235, 205, 119, .16), transparent 20%),
    repeating-linear-gradient(22deg, rgba(255,255,255,.025) 0 4px, transparent 4px 18px);
}

.foe-world .farm-map::before {
  opacity: .62;
  background-image:
    radial-gradient(circle at 12% 21%, rgba(255, 246, 166, .42) 0 1px, transparent 2px),
    radial-gradient(circle at 16% 67%, rgba(255, 234, 123, .34) 0 1px, transparent 2px),
    radial-gradient(circle at 71% 31%, rgba(255, 255, 255, .3) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 77%, rgba(255, 230, 132, .32) 0 1px, transparent 2px),
    radial-gradient(ellipse at 50% 80%, rgba(48, 90, 31, .35) 0 3px, transparent 5px),
    linear-gradient(72deg, transparent 0 47%, rgba(255,255,255,.045) 48% 49%, transparent 50%);
  background-size: 64px 58px, 94px 86px, 120px 95px, 82px 78px, 38px 31px, 44px 44px;
}

.foe-world .avatar {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 62%, rgba(33, 16, 7, .42) 63%),
    url("/assets/rooster.svg") center / 108% 108% no-repeat;
}

.foe-world .tree {
  width: 72px;
  height: 92px;
  background: center bottom / contain no-repeat;
  filter: drop-shadow(13px 18px 9px rgba(15, 28, 9, .3));
}

.foe-world .tree::before,
.foe-world .tree::after {
  display: none;
}

.foe-world .tree-a,
.foe-world .tree-c,
.foe-world .tree-d,
.foe-world .tree-h,
.foe-world .tree-i,
.foe-world .tree-l {
  background-image: url("/assets/tree-oak.svg");
}

.foe-world .tree-b,
.foe-world .tree-e,
.foe-world .tree-f,
.foe-world .tree-g,
.foe-world .tree-j,
.foe-world .tree-k {
  background-image: url("/assets/tree-pine.svg");
}

.foe-world .tree-c,
.foe-world .tree-h,
.foe-world .tree-l {
  width: 92px;
  height: 116px;
}

.foe-world .tree-b,
.foe-world .tree-d,
.foe-world .tree-g,
.foe-world .tree-j {
  width: 58px;
  height: 80px;
}

.foe-world .tree-a { left: 4%; top: 8%; }
.foe-world .tree-b { left: 15%; top: 10%; }
.foe-world .tree-c { left: 21%; top: 26%; }
.foe-world .tree-d { left: 6%; top: 57%; }
.foe-world .tree-e { left: 16%; top: 76%; }
.foe-world .tree-f { left: 30%; top: 72%; }
.foe-world .tree-g { left: 67%; top: 14%; }
.foe-world .tree-h { left: 82%; top: 34%; }
.foe-world .tree-i { left: 90%; top: 55%; }
.foe-world .tree-j { left: 70%; top: 77%; }
.foe-world .tree-k { left: 42%; top: 15%; }
.foe-world .tree-l { left: 2%; top: 36%; }

.foe-world .rock {
  width: 58px;
  height: 42px;
  border-radius: 0;
  background: url("/assets/rock.svg") center / contain no-repeat;
  box-shadow: none;
  filter: drop-shadow(8px 11px 6px rgba(18, 22, 9, .22));
}

.foe-world .rock-a { left: 35%; top: 23%; }
.foe-world .rock-b { left: 63%; top: 61%; width: 44px; height: 32px; }
.foe-world .rock-c { left: 82%; top: 23%; width: 50px; height: 36px; }

.foe-world .animal {
  background: center bottom / contain no-repeat;
  border-radius: 0;
  width: 58px;
  height: 42px;
  animation: animalWalk 8s ease-in-out infinite;
}

.foe-world .animal.chicken {
  width: 38px;
  height: 32px;
  background-image: url("/assets/chicken.svg");
}

.foe-world .animal.cow {
  width: 70px;
  height: 48px;
  background-image: url("/assets/cow.svg");
}

.foe-world .animal::before,
.foe-world .animal::after,
.foe-world .animal-body,
.foe-world .animal-head,
.foe-world .animal i {
  display: none;
}

.foe-world .animal-shadow {
  display: block;
  left: 8px;
  right: 5px;
  bottom: 0;
  height: 10px;
  background: rgba(17, 24, 8, .22);
}

.foe-world .decor-pig {
  position: absolute;
  left: 66%;
  top: 63%;
  z-index: 11;
  width: 76px;
  height: 50px;
  background: url("/assets/pig.svg") center / contain no-repeat;
  filter: drop-shadow(7px 9px 5px rgba(18, 19, 8, .2));
  pointer-events: none;
  animation: animalWalk 9s ease-in-out infinite reverse;
}

.foe-world .decor-well {
  position: absolute;
  left: 63%;
  top: 36%;
  z-index: 13;
  width: 72px;
  height: 72px;
  background: url("/assets/well.svg") center / contain no-repeat;
  filter: drop-shadow(9px 13px 7px rgba(20, 16, 7, .24));
  pointer-events: none;
}

.foe-world .campfire {
  width: 82px;
  height: 76px;
  background: url("/assets/campfire.svg") center / contain no-repeat;
}

.foe-world .campfire::before,
.foe-world .campfire::after {
  display: none;
}

.foe-world .building-grid {
  top: 38%;
  width: 560px;
  height: 370px;
}

.foe-world .building:nth-child(1) {
  left: 214px;
  top: 8px;
  transform: scale(1.45);
}

.foe-world .building:nth-child(1):hover {
  transform: translateY(-5px) scale(1.45);
}

.foe-world .building:nth-child(2) {
  left: 370px;
  top: 104px;
  transform: scale(.98);
}

.foe-world .building:nth-child(2):hover {
  transform: translateY(-5px) scale(.98);
}

.foe-world .building:nth-child(3) {
  left: 70px;
  top: 174px;
}

.foe-world .building:nth-child(4) {
  left: 390px;
  top: 236px;
}

.foe-world .building:nth-child(5) {
  left: 216px;
  top: 158px;
  transform: scale(1.08);
}

.foe-world .building:nth-child(5):hover {
  transform: translateY(-5px) scale(1.08);
}

.foe-world .building:nth-child(6) {
  left: 74px;
  top: 74px;
}

.foe-world .building-art {
  left: -32px;
  right: -32px;
  top: -42px;
  bottom: -16px;
  filter:
    drop-shadow(16px 24px 13px rgba(23, 17, 8, .3))
    saturate(1.13)
    contrast(1.05);
}

.foe-world .building:hover .building-art,
.foe-world .building.ready .building-art {
  filter:
    drop-shadow(17px 26px 14px rgba(23, 17, 8, .34))
    saturate(1.2)
    contrast(1.07)
    brightness(1.05);
}

.foe-world .field-grid {
  left: 25%;
  top: 61%;
  width: 382px;
  grid-template-columns: repeat(3, 112px);
  gap: 12px;
}

.foe-world .field-tile {
  min-height: 90px;
}

.foe-world .animal-zone {
  left: 44%;
  top: 64%;
  width: 235px;
  height: 130px;
}

.foe-world .meadow {
  opacity: .95;
  filter:
    drop-shadow(7px 9px 5px rgba(18, 28, 10, .16))
    saturate(1.16);
}

.foe-world .flowers {
  opacity: 1;
  filter:
    drop-shadow(4px 6px 3px rgba(20, 31, 11, .14))
    saturate(1.22);
}

.foe-world .water-channel {
  top: -4%;
  right: -2%;
  width: 28vw;
  height: 30vh;
  filter: saturate(1.12);
}

.foe-world .water-channel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 18%;
  bottom: -8px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 18% 40%, rgba(237, 205, 130, .95) 0 22%, transparent 24%),
    radial-gradient(ellipse at 46% 52%, rgba(230, 200, 126, .92) 0 18%, transparent 20%),
    radial-gradient(ellipse at 76% 50%, rgba(214, 181, 105, .84) 0 16%, transparent 18%);
  filter: blur(.2px);
}

.foe-world .path,
.foe-world .farm-road {
  box-shadow:
    inset 0 3px 8px rgba(255,255,255,.12),
    inset 0 -5px 10px rgba(77, 48, 23, .15),
    0 4px 6px rgba(38, 28, 13, .1);
}

.foe-world .build-dock,
.foe-world .topbar,
.foe-world .round-actions button,
.royal-banner,
.bottom-handle {
  box-shadow:
    inset 0 2px 0 rgba(255, 232, 159, .18),
    0 10px 28px rgba(13, 8, 4, .36);
}

@media (max-width: 820px) {
  .foe-world .building-grid {
    transform: translate(-50%, -50%) scale(.68);
  }

  .foe-world .field-grid {
    grid-template-columns: repeat(2, minmax(126px, 1fr));
  }
}

/* Landudvidelse v8: klikbare SVG-polygons og købs-panel efter reference. */
.land-expansion-layer[hidden],
.land-purchase-panel[hidden],
.land-map-hint[hidden] {
  display: none;
}

.land-expansion-layer {
  position: absolute;
  inset: 0;
  z-index: 32;
  pointer-events: none;
}

.land-parcel-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.land-parcel {
  pointer-events: auto;
  cursor: pointer;
  fill: rgba(235, 207, 89, .08);
  stroke: rgba(255, 230, 99, .72);
  stroke-width: 5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px rgba(255, 218, 75, .18));
  transition: fill .18s ease, stroke .18s ease, filter .18s ease, opacity .18s ease;
}

.land-parcel.available:hover,
.land-parcel.available.selected {
  fill: rgba(244, 210, 68, .24);
  stroke: #ffe36b;
  filter:
    drop-shadow(0 0 5px rgba(255, 238, 137, .86))
    drop-shadow(0 0 18px rgba(245, 197, 44, .72));
}

.land-parcel.owned {
  fill: rgba(71, 164, 73, .12);
  stroke: rgba(117, 212, 91, .72);
  filter: drop-shadow(0 0 8px rgba(70, 184, 83, .3));
}

.land-parcel.owned.selected {
  fill: rgba(82, 187, 74, .24);
  stroke: #8ce66f;
}

.land-parcel-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.parcel-map-label {
  position: absolute;
  z-index: 2;
  min-width: 76px;
  display: grid;
  gap: 2px;
  padding: 7px 11px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 226, 146, .16);
  border-radius: 7px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255,255,255,.14), transparent 34%),
    rgba(26, 24, 19, .82);
  color: #f2ead4;
  text-align: center;
  box-shadow: 0 8px 18px rgba(12, 10, 7, .3);
  pointer-events: auto;
}

.parcel-map-label strong {
  font-size: 12px;
  line-height: 1;
}

.parcel-map-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #f7d36a;
  font-size: 11px;
  font-weight: 950;
}

.parcel-map-label span::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,.55), transparent 23%),
    linear-gradient(135deg, #f4d065, #9f6b1f);
  box-shadow: inset 0 0 0 1px rgba(80, 46, 12, .18);
}

.parcel-map-label.owned {
  background:
    radial-gradient(circle at 20% 12%, rgba(255,255,255,.14), transparent 34%),
    rgba(35, 82, 34, .84);
}

.parcel-map-label.owned span {
  color: #d9ffd2;
}

.parcel-map-label.owned span::before {
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 25%, #fff4bd 0 15%, transparent 16%),
    linear-gradient(135deg, #79b75d, #2d6428);
}

.parcel-map-label.selected {
  border-color: rgba(255, 232, 128, .62);
  box-shadow:
    0 0 0 3px rgba(255, 218, 75, .18),
    0 8px 18px rgba(12, 10, 7, .3);
}

.land-purchase-panel {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 82;
  width: 320px;
  transform: translateY(-50%);
  padding: 18px;
  border: 2px solid rgba(75, 48, 28, .72);
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255, 244, 216, .98), rgba(220, 194, 143, .97)),
    #ead8aa;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.42),
    inset 0 0 30px rgba(105, 72, 34, .08),
    0 22px 60px rgba(12, 9, 5, .44);
  color: #332315;
}

.land-purchase-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(114, 78, 41, .24);
  pointer-events: none;
}

.land-panel-close {
  position: absolute;
  right: 10px;
  top: 9px;
  z-index: 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(68, 38, 18, .4);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.28), transparent 32%),
    linear-gradient(180deg, #4c3724, #1f130b);
  color: #fff0c0;
  font-size: 20px;
  font-weight: 950;
}

.land-purchase-panel .eyebrow {
  margin: 0 0 5px;
  color: #866744;
}

.land-purchase-panel h2 {
  margin: 0 34px 14px 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -.04em;
}

.parcel-preview {
  height: 118px;
  margin-bottom: 13px;
  overflow: hidden;
  border: 4px solid rgba(255, 245, 214, .86);
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 18% 62%, rgba(28, 71, 32, .75) 0 12%, transparent 23%),
    radial-gradient(ellipse at 78% 70%, rgba(35, 83, 34, .7) 0 10%, transparent 24%),
    radial-gradient(ellipse at 43% 58%, rgba(197, 177, 95, .38) 0 18%, transparent 42%),
    linear-gradient(180deg, #9bb1bc 0 22%, #c8d39a 23%, #88a75b 58%, #5d7d3b 100%);
  box-shadow:
    inset 0 0 22px rgba(20, 31, 16, .24),
    0 8px 18px rgba(42, 29, 14, .12);
}

.parcel-meta {
  display: grid;
  gap: 0;
  margin: 4px 0 12px;
  border-top: 1px solid rgba(84, 62, 39, .2);
  border-bottom: 1px solid rgba(84, 62, 39, .2);
}

.parcel-meta div {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(84, 62, 39, .16);
}

.parcel-meta div:first-child {
  border-top: 0;
}

.parcel-meta span {
  color: #6e5637;
  font-weight: 850;
}

.parcel-meta strong {
  color: #2e4f23;
  font-size: 20px;
  font-weight: 950;
}

#parcelPrice {
  color: #315f28;
}

.land-purchase-panel p:not(.eyebrow) {
  margin: 0 0 14px;
  color: #6d5232;
  line-height: 1.42;
}

.land-buy-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(22, 55, 21, .5);
  border-radius: 4px;
  background:
    radial-gradient(circle at 28% 16%, rgba(255,255,255,.22), transparent 32%),
    linear-gradient(180deg, #4e8b3a, #1e5d24);
  color: #fff3cf;
  font-family: Fraunces, Georgia, serif;
  font-size: 19px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 8px 18px rgba(17, 45, 17, .22);
}

.land-buy-button:disabled {
  filter: grayscale(.35);
  opacity: .64;
}

.land-map-hint {
  position: fixed;
  left: 18px;
  bottom: 94px;
  z-index: 82;
  width: 250px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 226, 146, .16);
  border-radius: 6px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255,255,255,.14), transparent 34%),
    rgba(23, 22, 18, .88);
  color: #f1e8d0;
  box-shadow: 0 14px 32px rgba(10, 8, 5, .32);
}

.land-map-hint strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 226, 146, .24);
  border-radius: 50%;
  color: #f4d16e;
  font-size: 19px;
}

.land-map-hint span {
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.foe-world.land-mode .building-grid,
.foe-world.land-mode .field-grid,
.foe-world.land-mode .animal-zone,
.foe-world.land-mode .map-decor {
  filter: saturate(.9) brightness(.82);
}

.foe-world.land-mode .build-dock {
  opacity: .86;
}

.foe-world.land-mode .right-panel {
  opacity: 0;
  pointer-events: none;
}

.foe-world .build-dock {
  width: 376px;
}

.foe-world .build-cards {
  grid-template-columns: repeat(5, 1fr);
}

.foe-world .mini-building.land::before {
  inset: 8px 3px 5px;
  height: auto;
  border-radius: 6px;
  background:
    radial-gradient(circle at 70% 35%, rgba(255, 232, 101, .42), transparent 22%),
    linear-gradient(135deg, rgba(255, 226, 100, .26), transparent 45%),
    linear-gradient(135deg, #73a44b, #355f2c);
  clip-path: polygon(8% 28%, 80% 8%, 96% 64%, 50% 92%, 4% 72%);
}

.foe-world .mini-building.land::after {
  inset: 8px 3px 5px;
  height: auto;
  clip-path: polygon(8% 28%, 80% 8%, 96% 64%, 50% 92%, 4% 72%);
  background: transparent;
  border: 2px solid #ffe36b;
  filter: drop-shadow(0 0 4px rgba(255, 226, 107, .55));
}

@media (max-width: 820px) {
  .land-purchase-panel {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 142px;
    width: auto;
    transform: none;
  }

  .land-map-hint {
    left: 10px;
    bottom: 250px;
    width: min(280px, calc(100vw - 20px));
  }

  .foe-world .build-dock {
    width: calc(100vw - 20px);
  }
}

/* Landkort v9: dedikeret skærm tæt på referencebilledet. */
.land-farm-card,
.land-resource-bar,
.land-map-tools {
  display: none;
}

.foe-world.land-mode {
  overflow: hidden;
  background: #111;
}

.foe-world.land-mode .farm-stage {
  position: fixed;
  inset: 0;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #111;
  filter: none;
}

.foe-world.land-mode .farm-map {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.16), transparent 16%, transparent 80%, rgba(0,0,0,.2)),
    url("/assets/land-map.svg") center / cover no-repeat !important;
  box-shadow: none;
}

.foe-world.land-mode .farm-map::before,
.foe-world.land-mode .farm-map::after {
  display: none;
}

.foe-world.land-mode .cinematic-vignette {
  z-index: 44;
  box-shadow:
    inset 0 80px 70px rgba(0,0,0,.3),
    inset 0 -110px 100px rgba(0,0,0,.28),
    inset 0 0 130px rgba(0,0,0,.18);
}

.foe-world.land-mode .terrain-shadow,
.foe-world.land-mode .farm-road,
.foe-world.land-mode .path,
.foe-world.land-mode .water-channel,
.foe-world.land-mode .orchard,
.foe-world.land-mode .map-decor,
.foe-world.land-mode .field-grid,
.foe-world.land-mode .building-grid,
.foe-world.land-mode .animal-zone,
.foe-world.land-mode .tractor,
.foe-world.land-mode .dust,
.foe-world.land-mode .build-dock,
.foe-world.land-mode .round-actions,
.foe-world.land-mode .royal-banner,
.foe-world.land-mode .bottom-handle,
.foe-world.land-mode .topbar,
.foe-world.land-mode .left-rail {
  display: none !important;
}

.foe-world.land-mode .land-expansion-layer {
  z-index: 48;
}

.foe-world.land-mode .land-farm-card {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  width: 266px;
  height: 60px;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 11px;
  padding: 7px 12px 7px 8px;
  border-right: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(29,31,31,.96), rgba(11,12,12,.94));
  box-shadow: 0 8px 24px rgba(0,0,0,.32);
  color: #f7efe0;
}

.land-farm-thumb {
  width: 54px;
  height: 46px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), transparent),
    url("/assets/land-preview.svg") center / cover no-repeat;
  box-shadow: 0 3px 10px rgba(0,0,0,.34);
}

.land-farm-card h1 {
  margin: 0 0 5px;
  font-family: Fraunces, Georgia, serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -.03em;
}

.land-level-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.land-level-row span {
  color: #e9e0d1;
  font-size: 12px;
  font-weight: 850;
}

.land-level-row strong {
  height: 13px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 3px;
  background:
    linear-gradient(90deg, #4d9a38 0 58%, rgba(33,33,33,.88) 59%);
  color: #e9f8dc;
  font-size: 10px;
  font-weight: 850;
}

.foe-world.land-mode .land-resource-bar {
  position: fixed;
  left: 266px;
  right: 0;
  top: 0;
  z-index: 90;
  height: 60px;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(27,29,29,.96), rgba(10,11,11,.95));
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}

.land-resource-bar > div {
  min-width: 136px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-left: 1px solid rgba(255,255,255,.05);
  border-right: 1px solid rgba(0,0,0,.28);
}

.land-resource-bar i {
  width: 24px;
  height: 24px;
  display: inline-block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 25%, rgba(255,255,255,.7), transparent 22%),
    linear-gradient(135deg, #f2d16b, #9d631d);
  box-shadow:
    inset 0 0 0 2px rgba(46,26,8,.22),
    0 2px 7px rgba(0,0,0,.28);
}

.land-resource-bar i.cash {
  border-radius: 5px;
  background:
    linear-gradient(135deg, #9bd36f, #2f7e35);
  transform: rotate(-13deg);
}

.land-resource-bar i.metal {
  border-radius: 4px;
  background:
    linear-gradient(135deg, #d8dde0, #7b858a 60%, #525b60);
  transform: skewX(-9deg);
}

.land-resource-bar i.wood {
  border-radius: 10px 4px 10px 4px;
  background:
    repeating-linear-gradient(135deg, #a7723b 0 5px, #6d3d1d 5px 10px);
}

.land-resource-bar i.people {
  border-radius: 50% 50% 42% 42%;
  background:
    radial-gradient(circle at 50% 26%, #bfc2bd 0 24%, transparent 25%),
    linear-gradient(180deg, transparent 0 42%, #777b76 43%);
}

.land-resource-bar strong {
  color: #efe7d6;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0,0,0,.55);
}

.land-resource-bar div button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin-left: 2px;
  border-radius: 5px;
  background: linear-gradient(180deg, #599546, #2b622a);
  color: #eaffd6;
  font-size: 17px;
  font-weight: 950;
}

.land-resource-bar nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.land-resource-bar nav button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(179, 143, 88, .45);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 20%, rgba(255,255,255,.18), transparent 28%),
    rgba(14,14,13,.86);
  color: #d5b075;
  font-size: 19px;
}

.foe-world.land-mode .land-purchase-panel {
  right: 18px;
  top: 50%;
  width: 332px;
  padding: 20px;
  border-radius: 4px;
  transform: translateY(-45%);
}

.foe-world.land-mode .land-purchase-panel h2 {
  text-align: center;
  margin-right: 28px;
  font-size: 28px;
}

.foe-world.land-mode .parcel-preview {
  height: 116px;
  background: url("/assets/land-preview.svg") center / cover no-repeat;
}

.foe-world.land-mode .land-map-hint {
  left: 18px;
  bottom: 66px;
  width: 196px;
  min-height: 62px;
  grid-template-columns: 42px 1fr;
  padding: 10px;
  border-radius: 5px;
}

.foe-world.land-mode .land-map-hint span {
  color: #efe8dc;
  font-size: 12px;
}

.foe-world.land-mode .land-map-tools {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  gap: 10px;
}

.land-map-tools button {
  width: 54px;
  height: 70px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 7px 4px;
  border: 1px solid rgba(209, 174, 114, .5);
  border-radius: 7px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.16), transparent 32%),
    rgba(18,18,16,.88);
  color: #efe0c3;
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,.34);
}

.land-map-tools span {
  color: #e1c58e;
  font-size: 27px;
  line-height: 1;
}

.foe-world.land-mode .land-parcel {
  stroke-width: 4;
}

.foe-world.land-mode .land-parcel.available.selected,
.foe-world.land-mode .land-parcel.available:hover {
  fill: rgba(244, 210, 68, .12);
  stroke: #ffe174;
  filter:
    drop-shadow(0 0 3px rgba(255, 255, 219, .95))
    drop-shadow(0 0 14px rgba(255, 216, 75, .92));
}

.foe-world.land-mode .land-parcel.owned {
  fill: rgba(56, 148, 59, .08);
  stroke: rgba(120, 214, 101, .78);
  filter:
    drop-shadow(0 0 3px rgba(163, 255, 132, .5))
    drop-shadow(0 0 10px rgba(72, 190, 72, .45));
}

.foe-world.land-mode .parcel-map-label {
  min-width: 74px;
  padding: 7px 10px;
  background:
    linear-gradient(180deg, rgba(37,35,31,.94), rgba(20,19,17,.92));
  border-color: rgba(255,255,255,.08);
}

.foe-world.land-mode .parcel-map-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(20,19,17,.92);
  border-right: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.foe-world.land-mode .parcel-map-label strong {
  color: #f4eee2;
  font-size: 12px;
}

.foe-world.land-mode .parcel-map-label span {
  color: #f3ce5e;
}

.foe-world.land-mode .parcel-map-label.owned {
  min-width: 92px;
  display: grid;
  grid-template-columns: 28px 1fr;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(54,66,47,.94), rgba(25,37,23,.92));
}

.foe-world.land-mode .parcel-map-label.owned::before {
  content: "⌂";
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef0dd;
  color: #557246;
  font-size: 17px;
}

.foe-world.land-mode .parcel-map-label.owned span::before {
  display: none;
}

.parcel-pin {
  position: absolute;
  z-index: 4;
  width: 42px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -100%);
  border: 3px solid rgba(255, 213, 80, .88);
  border-radius: 50% 50% 50% 8px;
  background:
    radial-gradient(circle at 50% 42%, #fff2a4 0 17%, transparent 18%),
    radial-gradient(circle at 50% 42%, #2d4322 0 36%, transparent 37%),
    linear-gradient(135deg, #d3932e, #5e3516);
  color: transparent;
  box-shadow:
    0 0 0 2px rgba(47, 26, 8, .48),
    0 6px 16px rgba(0,0,0,.34),
    0 0 18px rgba(255, 212, 64, .52);
  rotate: -45deg;
}

.parcel-pin::after {
  content: "♣";
  rotate: 45deg;
  color: #f3d567;
  font-size: 20px;
  transform: translate(1px, -1px);
}

@media (max-width: 900px) {
  .foe-world.land-mode .land-farm-card {
    width: 238px;
  }

  .foe-world.land-mode .land-resource-bar {
    left: 238px;
  }

  .land-resource-bar > div {
    min-width: auto;
    padding: 0 9px;
  }

  .land-resource-bar nav button {
    width: 32px;
    height: 32px;
  }
}
