:root {
  --ink: #2c1b10;
  --muted: #5d4434;
  --accent: #e07a3b;
  --leaf: #2f7d32;
  --soil: #7b4f2a;
  --soil-deep: #5b361d;
  --cream: #f7ecd4;
  --card: #fff3dd;
  --danger: #e35f3d;
  --shadow: 0 20px 45px rgba(53, 32, 12, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 8% 20%, #fff6dd 0%, transparent 55%),
    radial-gradient(circle at 92% 12%, #ffe4b8 0%, transparent 48%),
    linear-gradient(160deg, #f7e2b6 0%, #f2c988 45%, #e1b072 100%);
  overflow-x: hidden;
}

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

body::before {
  width: 55vmax;
  height: 55vmax;
  top: -15vmax;
  left: -10vmax;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 70%);
  filter: blur(2px);
}

body::after {
  width: 45vmax;
  height: 45vmax;
  bottom: -18vmax;
  right: -10vmax;
  background: radial-gradient(circle, rgba(117, 78, 46, 0.3), transparent 68%);
  filter: blur(8px);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  justify-content: center;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  justify-content: flex-start;
  animation: rise 0.8s ease both;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
}

h1 {
  font-family: "Bungee", "Space Grotesk", sans-serif;
  font-size: clamp(32px, 5vw, 54px);
  margin: 0 0 12px;
  line-height: 1.05;
}

.sub {
  margin: 0;
  max-width: 460px;
  font-size: 16px;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
}

.stat {
  background: linear-gradient(165deg, #fff4dd 0%, #f6ddb0 100%);
  padding: 14px 16px;
  border-radius: 16px;
  background-clip: padding-box;
  box-shadow: 0 10px 20px rgba(89, 56, 26, 0.16),
    inset 0 -2px 0 rgba(123, 79, 42, 0.18);
  border: 2px solid rgba(123, 79, 42, 0.24);
}

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

.stat strong {
  display: block;
  font-size: 22px;
  margin-top: 8px;
  font-weight: 600;
}

.card.stat {
  padding: 14px 16px;
  border-radius: 16px;
  background-clip: border-box;
}

.game-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 32px;
  align-items: stretch;
}

.left-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 100%;
}

.left-footer {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.play-panel {
  display: grid;
  grid-template-columns: 180px auto;
  gap: 20px;
  align-items: stretch;
  padding: 22px;
  border-radius: 28px;
  background: #f8edd3;
  border: 3px solid rgba(123, 79, 42, 0.35);
  box-shadow: 0 26px 50px rgba(82, 48, 21, 0.25);
  justify-self: start;
}

.info-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  height: 100%;
}

.stats-vertical {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px 20px;
  border: 2px solid rgba(123, 79, 42, 0.18);
  box-shadow: var(--shadow);
  animation: rise 0.8s ease both;
}

.card:nth-child(2) {
  animation-delay: 0.15s;
}

.card:nth-child(3) {
  animation-delay: 0.3s;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

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

.tips .tip-title {
  margin: 12px 0 6px;
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

.crop-sequence {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.crop-sequence li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  border: 1px solid rgba(123, 79, 42, 0.16);
}

.crop-sequence li+li::before {
  content: "→";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent);
  font-weight: 600;
}

.crop-sequence img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.crop-sequence span {
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
}

.next-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}

.preview-frame {
  width: 140px;
  height: 140px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, #fff8ea, #f2d8a6);
  border: 2px solid rgba(123, 79, 42, 0.25);
  box-shadow: inset 0 -12px 18px rgba(0, 0, 0, 0.12),
    inset 0 10px 16px rgba(255, 255, 255, 0.45);
  animation: float 2.2s ease-in-out infinite;
}

.preview-frame canvas {
  width: 120px;
  height: 120px;
  display: block;
}

.next-label {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.game-stage {
  position: relative;
  width: min(100%, 324px);
  max-width: none;
  margin: 0;
  aspect-ratio: 81 / 160;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
  animation: rise 0.8s ease both;
  animation-delay: 0.2s;
}

.game-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.danger-line {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--danger-y, 14%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  pointer-events: none;
  z-index: 2;
}

.danger-line::before,
.danger-line::after {
  content: "";
  height: 2px;
  flex: 1;
  background: repeating-linear-gradient(90deg,
      rgba(227, 95, 61, 0.7) 0px,
      rgba(227, 95, 61, 0.7) 8px,
      transparent 8px,
      transparent 16px);
}

.danger-line span {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b24a2c;
  background: #f7d4c8;
  padding: 3px 10px;
  border-radius: 999px;
}

.game-stage.danger .danger-line span {
  color: #fff;
  background: var(--danger);
}

.game-stage.danger .danger-line::before,
.game-stage.danger .danger-line::after {
  background: repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.9) 0px,
      rgba(255, 255, 255, 0.9) 8px,
      transparent 8px,
      transparent 16px);
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 18, 12, 0.55);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.overlay-card {
  background: #fff3e1;
  padding: 24px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid rgba(123, 79, 42, 0.25);
  animation: rise 0.5s ease both;
}

.overlay-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.overlay-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(138, 73, 32, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(138, 73, 32, 0.3);
}

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid rgba(123, 79, 42, 0.4);
  box-shadow: none;
}


@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 980px) {
  .hero {
    gap: 16px;
  }
}

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

  .left-panel {
    justify-content: flex-start;
    min-height: auto;
  }

  .play-panel {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .game-stage {
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .shell {
    padding: 32px 16px 36px;
  }

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

  .stat strong {
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  .shell {
    padding: 4px;
  }

  .play-panel {
    padding: 8px;
    border-radius: 16px;
  }

  .info-panel {
    flex-direction: column-reverse;
    justify-content: flex-start;
    gap: 12px;
  }
}
