:root {
  --sky-top: #1599d1;
  --sky-mid: #5bd7f1;
  --sky-bottom: #d9fbff;
  --grass-top: #aeea54;
  --grass-bottom: #3f8f22;
  --frame: #106a86;
  --frame-dark: #06384e;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #06364c;
  --gold: #ffcf4a;
  --berry: #ff6f9f;
  --mint: #58d68d;
  --soil: #7d4726;
  --shadow: 0 18px 0 rgba(6, 56, 78, 0.14), 0 24px 38px rgba(5, 71, 97, 0.24);
  --pixel-shadow: 0 4px 0 rgba(6, 56, 78, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Gowun Dodum", sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    radial-gradient(circle at 15% 12%, rgba(255, 255, 255, 0.28), transparent 16%),
    radial-gradient(circle at 84% 14%, rgba(255, 243, 118, 0.26), transparent 18%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, var(--sky-bottom) 100%);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: 0;
  height: 260px;
  background:
    radial-gradient(circle at 12% 62%, rgba(255, 255, 255, 0.72) 0 20px, transparent 21px),
    radial-gradient(circle at 19% 58%, rgba(255, 255, 255, 0.62) 0 30px, transparent 31px),
    radial-gradient(circle at 81% 38%, rgba(255, 255, 255, 0.55) 0 22px, transparent 23px),
    radial-gradient(circle at 88% 34%, rgba(255, 255, 255, 0.45) 0 34px, transparent 35px);
  animation: skyDrift 18s ease-in-out infinite alternate;
}

body::after {
  bottom: 0;
  height: 150px;
  background:
    radial-gradient(80px 40px at 9% 80%, rgba(63, 143, 34, 0.52), transparent 72%),
    radial-gradient(110px 52px at 28% 88%, rgba(80, 161, 40, 0.46), transparent 72%),
    radial-gradient(96px 44px at 72% 86%, rgba(63, 143, 34, 0.5), transparent 72%),
    linear-gradient(180deg, transparent, rgba(39, 117, 35, 0.42));
}

button,
a {
  font: inherit;
}

.garden-app {
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px 16px 24px;
  position: relative;
  z-index: 1;
}

.session-bar,
.session-actions,
.status-strip,
.tab-row,
.game-layout,
.forecast-strip,
.garden-bed,
.resource-bar,
.ticker-list {
  display: flex;
}

.session-bar,
.status-strip,
.tab-row,
.resource-bar,
.ticker-list {
  gap: 10px;
}

.session-bar {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.session-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.capsule-button,
.capsule-info,
.tab-button,
.action-button,
.status-segment,
.summary-cell,
.resource-segment,
.field-marker,
.hero-copy-bubble,
.ticker-zone {
  border: 3px solid var(--frame);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), var(--shadow);
}

.capsule-button,
.tab-button,
.action-button,
.tooltip-link {
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.capsule-button:hover,
.tab-button:hover,
.action-button:hover,
.tooltip-link:hover {
  filter: saturate(1.08) brightness(1.03);
  transform: translateY(-2px);
}

.capsule-button:active,
.tab-button:active,
.action-button:active,
.tooltip-link:active {
  transform: translateY(2px);
}

.capsule-button,
.capsule-info {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(219, 248, 255, 0.92));
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.72), var(--pixel-shadow);
}

.capsule-button {
  cursor: pointer;
  font-weight: 700;
}

.capsule-info.is-error {
  background: #fff0f0;
  color: #8c2140;
  border-color: #b75070;
}

#logoutButton[hidden] {
  display: none;
}

.status-strip {
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.status-secondary {
  display: none;
}

.status-segment {
  flex: 1 1 0;
  min-width: 180px;
  padding: 10px 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 246, 181, 0.74)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(228, 248, 255, 0.92));
  position: relative;
  overflow: hidden;
}

.status-segment::after {
  content: "";
  position: absolute;
  inset: auto 12px 8px auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 207, 74, 0.42);
  transform: rotate(12deg);
}

.status-segment span,
.board-title,
.summary-name,
.ticker-badge,
.field-marker span,
.ticker-header span,
.resource-segment span {
  display: block;
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
  line-height: 1.5;
}

.status-segment strong {
  display: block;
  margin-top: 8px;
  color: #0b5676;
  font-size: 1rem;
}

.tab-row {
  align-items: stretch;
  margin-bottom: 12px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 18px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #fff8a8, #d3ef4d);
  color: #204f66;
  text-decoration: none;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.64), 0 6px 0 rgba(6, 56, 78, 0.22);
}

.tab-button.is-active {
  background: linear-gradient(180deg, #ffb3cf, #ff6f9f);
  transform: translateY(2px);
  color: #64203a;
}

.tab-link {
  margin-left: auto;
}

.game-layout {
  display: block;
}

.action-rail {
  width: auto;
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border: 4px solid var(--frame-dark);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.14) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(215, 247, 226, 0.78));
  background-size: 20px 20px, auto;
  box-shadow: var(--shadow);
}

.action-button {
  display: flex;
  flex: 1 1 0;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 207, 74, 0.34) 0 9px, transparent 10px),
    linear-gradient(180deg, #fffefb, #d8f4ff);
  color: var(--text);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  min-height: 72px;
  position: relative;
  overflow: hidden;
}

.action-button::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -20px;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: rgba(88, 214, 141, 0.24);
  transform: rotate(28deg);
}

.action-button > * {
  position: relative;
  z-index: 1;
}

.action-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
  color: #ff438f;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.76);
}

.action-button strong {
  font-size: 1.02rem;
  white-space: nowrap;
}

.action-button small {
  color: #2f6981;
  display: none;
}

.game-screen {
  flex: 1;
  min-width: 0;
}

.board-header {
  border: 4px solid var(--frame-dark);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 207, 74, 0.24), transparent 38%),
    linear-gradient(180deg, rgba(14, 119, 152, 0.98), rgba(8, 94, 122, 0.96));
  background-size: 22px 22px, 22px 22px, auto, auto;
  position: relative;
}

.board-header::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.22);
  border-radius: 17px;
  pointer-events: none;
}

.city-panel {
  padding: 18px 20px 12px;
  color: white;
  position: relative;
  z-index: 1;
}

.board-title {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.82);
}

.city-panel h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.06;
  text-shadow: 0 4px 0 rgba(4, 52, 73, 0.28);
}

.city-panel p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.forecast-strip {
  padding: 0 12px 12px;
  overflow-x: auto;
  position: relative;
  z-index: 1;
}

.summary-cell {
  min-width: 180px;
  padding: 12px 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 136, 0.72)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 252, 255, 0.94));
  transform: translateZ(0);
}

.summary-cell:nth-child(n + 4) {
  display: none;
}

.summary-value {
  display: block;
  margin-top: 8px;
  font-size: 1.16rem;
  color: #0d5672;
}

.summary-caption {
  margin: 8px 0 0;
  color: #3b6880;
  line-height: 1.5;
}

.field-screen {
  position: relative;
  min-height: 720px;
  margin-top: 12px;
  border: 4px solid var(--frame-dark);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.28), transparent 18%),
    radial-gradient(circle at 78% 16%, rgba(255, 232, 122, 0.34), transparent 16%),
    linear-gradient(180deg, rgba(29, 185, 220, 0.95) 0%, rgba(130, 225, 243, 0.94) 56%, rgba(156, 218, 69, 0.96) 56%, rgba(70, 135, 20, 0.98) 100%);
}

.field-screen::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.08) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.08) 75%),
    linear-gradient(45deg, rgba(31, 103, 26, 0.12) 25%, transparent 25%, transparent 75%, rgba(31, 103, 26, 0.12) 75%);
  background-position: 0 0, 18px 18px;
  background-size: 36px 36px;
  opacity: 0.72;
}

.field-screen::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  top: 53%;
  height: 42px;
  background:
    radial-gradient(34px 24px at 20px 22px, var(--grass-top) 0 68%, transparent 70%) repeat-x;
  background-size: 54px 42px;
  filter: drop-shadow(0 6px 0 rgba(31, 103, 26, 0.18));
}

.sky-layer {
  position: relative;
  height: 220px;
  z-index: 1;
}

.sun-orb {
  position: absolute;
  top: 26px;
  right: 88px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid #ef9205;
  background: radial-gradient(circle at 30% 30%, #fff9be, #ffd44a 64%, #f6ab18 100%);
  box-shadow: 0 0 0 12px rgba(255, 214, 73, 0.2);
  animation: sunPulse 4.5s ease-in-out infinite;
}

.cloud {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 5px 10px rgba(255, 255, 255, 0.18));
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: inherit;
}

.cloud-a {
  top: 46px;
  left: 68px;
  width: 118px;
  height: 38px;
  animation: cloudBob 7s ease-in-out infinite;
}

.cloud-a::before {
  top: -18px;
  left: 18px;
  width: 50px;
  height: 50px;
}

.cloud-a::after {
  top: -12px;
  right: 18px;
  width: 44px;
  height: 44px;
}

.cloud-b {
  top: 94px;
  left: 320px;
  width: 100px;
  height: 30px;
  animation: cloudBob 8s ease-in-out infinite 0.8s;
}

.cloud-b::before {
  top: -14px;
  left: 14px;
  width: 40px;
  height: 40px;
}

.cloud-b::after {
  top: -10px;
  right: 14px;
  width: 32px;
  height: 32px;
}

.cloud-c {
  top: 68px;
  right: 220px;
  width: 126px;
  height: 40px;
  animation: cloudBob 7.4s ease-in-out infinite 0.35s;
}

.cloud-c::before {
  top: -18px;
  left: 24px;
  width: 48px;
  height: 48px;
}

.cloud-c::after {
  top: -12px;
  right: 18px;
  width: 36px;
  height: 36px;
}

.hero-copy-bubble {
  position: absolute;
  left: 24px;
  bottom: 14px;
  max-width: 350px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.72), 0 9px 0 rgba(6, 56, 78, 0.18);
}

.hero-copy-bubble::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold);
  color: #755000;
  font-family: "Press Start 2P", monospace;
  font-size: 0.62rem;
  vertical-align: middle;
}

.garden-field {
  position: relative;
  min-height: 470px;
  z-index: 1;
}

.garden-bed {
  position: absolute;
  inset: 0 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 24px 32px 76px;
  perspective: 900px;
}

.garden-plant {
  position: relative;
  flex: 0 1 150px;
  height: 270px;
  margin-top: var(--bed-offset, 0px);
  filter: drop-shadow(0 14px 0 rgba(45, 93, 28, 0.16));
}

.plant-anchor {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 100%;
}

.plant-sprite {
  position: absolute;
  left: 50%;
  bottom: 44px;
  width: 140px;
  height: 176px;
  transform: translateX(-50%);
  transition: transform 180ms ease, filter 180ms ease;
}

.stem {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: calc(var(--stem-height, 84) * 1px);
  border-radius: 999px;
  background: linear-gradient(90deg, #1f782f 0 24%, #83e46b 25% 68%, #2f9340 69% 100%);
  transform: translateX(-50%);
  box-shadow: 3px 0 0 rgba(19, 89, 34, 0.22);
}

.leaf {
  position: absolute;
  bottom: calc(var(--leaf-bottom, 44) * 1px);
  width: calc(var(--leaf-size, 30) * 1px);
  height: calc(var(--leaf-size, 30) * 0.7px);
  border-radius: 999px 999px 999px 0;
  background: linear-gradient(135deg, #a9f57d, #3aaa46);
  box-shadow: inset 0 -3px 0 rgba(20, 99, 37, 0.2);
}

.leaf-left {
  left: 18px;
  transform: rotate(-30deg);
}

.leaf-right {
  right: 18px;
  transform: scaleX(-1) rotate(-30deg);
}

.flower {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.98) 0 25%, var(--flower-color, #ffb3c7) 26% 100%);
  box-shadow: 0 8px 14px rgba(255, 193, 115, 0.24);
  border: 2px solid rgba(128, 65, 95, 0.18);
}

.flower::before,
.flower::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
}

.flower-main {
  left: 50%;
  bottom: calc(var(--flower-bottom, 98) * 1px);
  width: calc(var(--flower-size, 42) * 1px);
  height: calc(var(--flower-size, 42) * 1px);
  transform: translateX(-50%);
}

.flower-side {
  right: 18px;
  bottom: calc(var(--side-bottom, 78) * 1px);
  width: calc(var(--side-size, 22) * 1px);
  height: calc(var(--side-size, 22) * 1px);
  opacity: var(--side-opacity, 0.2);
}

.garden-plant[data-flower-variant="round"] .flower-main::before {
  transform: rotate(60deg);
}

.garden-plant[data-flower-variant="round"] .flower-main::after {
  transform: rotate(-60deg);
}

.garden-plant[data-flower-variant="star"] .flower-main {
  border-radius: 42% 58% 48% 52%;
  transform: translateX(-50%) rotate(14deg);
}

.garden-plant[data-flower-variant="star"] .flower-main::before {
  transform: rotate(45deg) scale(0.92);
}

.garden-plant[data-flower-variant="star"] .flower-main::after {
  transform: rotate(90deg) scale(0.92);
}

.garden-plant[data-flower-variant="tulip"] .flower-main {
  border-radius: 58% 58% 42% 42%;
}

.garden-plant[data-flower-variant="tulip"] .flower-main::before {
  inset: 10% 18% -6% 18%;
  border-radius: 60% 60% 40% 40%;
  transform: rotate(-18deg);
}

.garden-plant[data-flower-variant="tulip"] .flower-main::after {
  inset: 10% 18% -6% 18%;
  border-radius: 60% 60% 40% 40%;
  transform: rotate(18deg);
}

.garden-plant[data-flower-variant="clover"] .flower-main {
  border-radius: 48%;
}

.garden-plant[data-flower-variant="clover"] .flower-main::before {
  transform: translateX(-34%) translateY(-18%) scale(0.82);
}

.garden-plant[data-flower-variant="clover"] .flower-main::after {
  transform: translateX(34%) translateY(-18%) scale(0.82);
}

.garden-plant[data-flower-variant="clover"] .flower-side {
  border-radius: 45%;
}

.pot {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 112px;
  height: 58px;
  transform: translateX(-50%);
  border-radius: 18px 18px 26px 26px;
  border: 3px solid rgba(89, 42, 20, 0.46);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.18) 0 18%, transparent 19% 100%),
    linear-gradient(180deg, #d89852, #8f4f27);
  box-shadow: inset 0 -7px 0 rgba(83, 43, 22, 0.24), 0 7px 0 rgba(38, 77, 27, 0.16);
}

.pot::before {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  top: -10px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(89, 42, 20, 0.36);
  background: linear-gradient(180deg, #ca8044, #83461e);
}

.plant-name {
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  min-width: 84px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid rgba(8, 91, 118, 0.64);
  background: rgba(255, 252, 214, 0.95);
  color: #164e67;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 0 rgba(6, 56, 78, 0.16);
}

.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff8c7;
  transform: rotate(45deg);
  opacity: 0;
}

.sparkle-a {
  left: 20px;
  top: 40px;
}

.sparkle-b {
  right: 24px;
  top: 72px;
}

.garden-plant.is-recent .sparkle {
  opacity: 1;
  animation: sparkleFloat 1.8s ease-in-out infinite;
}

.garden-plant.is-recent .sparkle-b {
  animation-delay: 0.55s;
}

.garden-plant.is-recent .flower-main,
.garden-plant.is-recent .flower-side {
  animation: flowerGlow 2.2s ease-in-out infinite;
}

.garden-plant.is-highlighted .plant-sprite {
  animation: plantBounce 0.9s ease-out;
}

.garden-plant[data-stage="0"] {
  opacity: 0.78;
}

.garden-plant[data-stage="0"] .pot {
  filter: grayscale(0.12);
}

.garden-plant[data-stage="4"] .plant-sprite,
.garden-plant[data-stage="5"] .plant-sprite {
  filter: drop-shadow(0 0 12px rgba(255, 241, 136, 0.5));
}

.plant-anchor:hover .plant-sprite,
.plant-anchor:focus-visible .plant-sprite {
  transform: translateX(-50%) translateY(-10px) scale(1.04);
}

.plant-anchor:focus-visible {
  outline: none;
}

.plant-tooltip {
  position: absolute;
  left: 50%;
  bottom: 188px;
  width: 230px;
  padding: 14px;
  border: 3px solid var(--frame);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 20;
  backdrop-filter: blur(6px);
}

.garden-plant:hover .plant-tooltip,
.garden-plant:focus-within .plant-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.plant-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 18px;
  height: 18px;
  border-right: 3px solid var(--frame);
  border-bottom: 3px solid var(--frame);
  background: rgba(255, 255, 255, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.tooltip-name {
  display: block;
  color: #0d5672;
  font-size: 1.02rem;
}

.tooltip-stage,
.tooltip-total,
.tooltip-date,
.tooltip-caption {
  margin: 8px 0 0;
  line-height: 1.48;
  color: #356983;
}

.tooltip-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 2px solid rgba(8, 91, 118, 0.64);
  background: linear-gradient(180deg, #fff7a8, #ffd95a);
  color: #164e67;
  font-weight: 700;
  text-decoration: none;
}

.field-marker {
  position: absolute;
  bottom: 22px;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(219, 248, 255, 0.9));
  z-index: 4;
}

.field-marker strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  color: #0d5672;
}

.marker-left {
  left: 18px;
}

.marker-right {
  right: 18px;
}

.ticker-zone {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(16, 106, 134, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(229, 249, 255, 0.92));
  background-size: 18px 18px, auto;
  overflow: hidden;
}

.ticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
}

.ticker-header::-webkit-details-marker {
  display: none;
}

.ticker-header::after {
  content: "OPEN";
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  min-height: 32px;
  border: 2px solid rgba(8, 91, 118, 0.48);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7a8, #ffd95a);
  color: #755000;
  font-family: "Press Start 2P", monospace;
  font-size: 0.5rem;
}

.ticker-zone.is-open .ticker-header {
  margin-bottom: 10px;
}

.ticker-zone.is-open .ticker-header::after {
  content: "CLOSE";
}

.ticker-zone.is-collapsed .ticker-list {
  display: none;
}

.ticker-header strong {
  color: #0d5672;
}

.ticker-list {
  flex-wrap: wrap;
}

.ticker-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  flex: 1 1 280px;
  min-height: 90px;
  padding: 10px 12px;
  border: 2px solid rgba(12, 97, 128, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 255, 226, 0.74));
  border-radius: 16px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.76);
}

.ticker-badge {
  display: inline-grid;
  place-items: center;
  align-self: start;
  min-height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--berry), #ff9fc0);
  color: #fff;
  text-shadow: 0 2px 0 rgba(99, 32, 58, 0.38);
}

.ticker-title {
  display: block;
  color: #0d5672;
}

.ticker-copy {
  margin: 7px 0 0;
  color: #356983;
  line-height: 1.5;
}

.resource-bar {
  margin: 0 12px 12px;
  border: 4px solid var(--frame-dark);
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.22) 1px, transparent 1px),
    linear-gradient(180deg, #fff47b, #ffe06a);
  background-size: 22px 22px, auto;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

.resource-segment {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 16px;
  border-right: 3px solid rgba(139, 100, 0, 0.26);
}

.resource-segment:last-child {
  border-right: 0;
}

.resource-segment strong {
  display: block;
  margin-top: 8px;
  color: #6a4b00;
  font-size: 1.16rem;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
}

@keyframes skyDrift {
  from {
    transform: translateX(-18px);
  }
  to {
    transform: translateX(18px);
  }
}

@keyframes sunPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(255, 214, 73, 0.2);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 18px rgba(255, 214, 73, 0.16);
  }
}

@keyframes cloudBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes sparkleFloat {
  0% {
    transform: translateY(0) rotate(45deg) scale(0.7);
    opacity: 0.15;
  }
  40% {
    transform: translateY(-8px) rotate(45deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-14px) rotate(45deg) scale(0.7);
    opacity: 0.05;
  }
}

@keyframes flowerGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 244, 176, 0));
    box-shadow: 0 8px 14px rgba(255, 193, 115, 0.24);
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(255, 244, 176, 0.88));
    box-shadow: 0 10px 20px rgba(255, 232, 128, 0.55);
  }
}

@keyframes plantBounce {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  35% {
    transform: translateX(-50%) translateY(-12px);
  }
  100% {
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 1220px) {
  .game-layout {
    flex-direction: column;
  }

  .action-rail {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .action-button {
    flex: 1 1 220px;
  }
}

@media (max-width: 900px) {
  .garden-bed {
    justify-content: space-around;
    padding: 20px 16px 90px;
  }

  .garden-plant {
    flex-basis: 132px;
  }

  .resource-bar {
    flex-wrap: wrap;
  }

  .resource-segment {
    min-width: calc(50% - 5px);
    border-right: 0;
    border-bottom: 3px solid rgba(139, 100, 0, 0.2);
  }

  .resource-segment:last-child,
  .resource-segment:nth-last-child(2) {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .garden-app {
    padding: 12px;
  }

  .session-bar,
  .session-actions,
  .status-strip,
  .tab-row,
  .action-rail,
  .ticker-list {
    flex-direction: column;
  }

  .tab-link {
    margin-left: 0;
  }

  .forecast-strip {
    flex-direction: column;
  }

  .garden-bed {
    gap: 0;
  }

  .garden-plant {
    flex-basis: 46%;
    height: 245px;
  }

  .field-marker {
    bottom: 16px;
  }

  .marker-left {
    left: 10px;
  }

  .marker-right {
    right: 10px;
  }

  .sun-orb {
    right: 24px;
    width: 72px;
    height: 72px;
  }

  .cloud-b,
  .cloud-c {
    display: none;
  }

  .hero-copy-bubble {
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

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