@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap");
:root {
  --paper: #faf6ec;
  --ink: #343b2c;
  --orange: #d96932;
  --line: #e4dfd1;
  --green: #6c7851;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
button {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible {
  outline: 3px solid #d96932;
  outline-offset: 5px;
}

.icon-button {
  border: 1px solid var(--line);
  background: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 20px;
}
.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 38%);
  width: 100%;
  height: 100dvh;
  min-height: 0;
  margin: 0;
}
.patch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: clamp(24px, 5vh, 56px) clamp(20px, 5vw, 72px) 24px;
  text-align: center;
  background: #fff2bb url("assets/background.png") center / cover no-repeat;
}
.patch .icon-button {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #fff9e8cc;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.score {
  font:
    600 68px/0.95 "Outfit",
    sans-serif;
  letter-spacing: -3px;
}
.unit {
  font:
    400 20px "DM Sans",
    sans-serif;
  color: #9c9b87;
  letter-spacing: 0;
  margin-left: 10px;
}
.growth {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: #898b79;
  font-size: 11px;
  margin-top: 14px;
}
.growth b {
  color: var(--green);
}
.growth i {
  margin: 0 6px;
}
.pumpkin-stage {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 0;
  margin: 0 auto;
}
.pumpkin-button {
  background: transparent;
  border: 0;
  position: relative;
  width: 100%;
  height: min(100%, 64dvh);
  min-height: 0;
  max-width: 700px;
  padding: 0;
  flex: 1;
  transition: transform 0.12s;
  touch-action: manipulation;
  user-select: none;
  z-index: 2;
}
.pumpkin-button:hover {
  transform: rotate(-2deg) scale(1.025);
}
.pumpkin-button:active {
  transform: scale(0.94);
}
.pumpkin-image {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 12px 8px #78502220);
  transform: scale(var(--pumpkin-scale, 0.32));
  transform-origin: 50% 85%;
  transition: transform 0.35s ease-out;
}
.milestone {
  display: flex;
  position: relative;
  text-align: left;
  align-items: center;
  gap: 13px;
  padding: 16px 17px 22px;
  border: 1px solid #dfd7bf;
  border-radius: 9px;
  background: #fff9e8ed;
  width: 100%;
  flex-shrink: 0;
}
.medal {
  font-size: 32px;
  color: #ae8948;
}
.milestone small {
  font-size: 7px;
  letter-spacing: 1.5px;
  color: #93917c;
  display: block;
}
.milestone strong {
  font:
    500 22px "Outfit",
    sans-serif;
  display: block;
  margin-top: 2px;
}
#next-label {
  margin-left: auto;
  font-size: 9px;
  color: #8b8c78;
}
.progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e5deca;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
}
#progress {
  height: 100%;
  background: #849063;
  transition: width 0.3s;
}
aside {
  padding: clamp(24px, 4vw, 56px);
  min-height: 0;
  overflow-y: auto;
}
.shop-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
h2 {
  font:
    500 29px "Outfit",
    sans-serif;
  letter-spacing: -1px;
  margin: 11px 0 28px;
}
h2 span {
  color: var(--orange);
}
.shop-flower {
  font-size: 40px;
  color: #a7ac8d;
  margin-top: -20px;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  border-bottom: 1px solid var(--line);
}
.tabs button {
  background: none;
  border: 0;
  min-height: 60px;
  padding: 16px 10px;
  font-size: 17px;
  color: #999784;
  position: relative;
}
.tabs .active {
  color: var(--ink);
  font-weight: 700;
}
.tabs .active:after {
  content: "";
  position: absolute;
  height: 2px;
  bottom: -1px;
  left: 0;
  right: 0;
  background: var(--orange);
}
.tabs span {
  font-size: 9px;
  border-radius: 4px;
  background: #e8e5d8;
  padding: 2px 5px;
  margin-left: 5px;
}
.wallet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}
.wallet strong {
  font-size: 21px;
  letter-spacing: 0;
}
.wallet strong > span:last-child {
  font-size: 18px;
  color: #c98e42;
  margin-left: 6px;
}
.upgrade {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 9px;
  background: #fffdf7;
  text-align: left;
  color: var(--ink);
  transition:
    background 0.2s,
    transform 0.2s;
}
.upgrade:hover:not(:disabled) {
  background: #f0efdf;
  transform: translateY(-2px);
}
.upgrade:disabled {
  cursor: default;
}
.upgrade:disabled .price {
  color: #aaa58f;
  background: #eeece3;
}
.upgrade-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  border-radius: 9px;
  background: #f0e7d3;
  font-size: 25px;
}
.upgrade:nth-child(2) .upgrade-icon {
  background: #e8ecde;
}
.upgrade:nth-child(3) .upgrade-icon {
  background: #f2e1cf;
}
.upgrade:nth-child(4) .upgrade-icon {
  background: #e9e4ef;
}
.upgrade:nth-child(5) .upgrade-icon {
  background: #e7eadc;
}
.upgrade-copy {
  flex: 1;
}
.upgrade-name {
  font-size: 12px;
  font-weight: 700;
}
.owned {
  font-size: 9px;
  color: #9c9b89;
  font-weight: 400;
  margin-left: 6px;
}
.upgrade-desc {
  font-size: 9px;
  color: #979381;
  margin-top: 5px;
}
.price {
  color: #fff;
  background: #77815c;
  padding: 8px 10px;
  font-size: 11px;
  white-space: nowrap;
  border-radius: 5px;
}
.tip {
  display: flex;
  gap: 16px;
  margin: 24px 0;
  padding: 20px;
  border-radius: 12px;
  background: #f0e9d9;
  align-items: center;
}
.tip > span {
  flex-shrink: 0;
  font-size: 40px;
  line-height: 1;
}
.tip p {
  margin: 0;
  font-size: 13px;
  color: #827e6a;
  line-height: 1.7;
}
.tip b {
  font-weight: 600;
  color: var(--ink);
}
.floater {
  position: absolute;
  pointer-events: none;
  color: #a95027;
  font:
    bold 28px "Outfit",
    sans-serif;
  z-index: 5;
  animation: float 1s forwards;
}
@keyframes float {
  to {
    transform: translateY(-95px) rotate(10deg);
    opacity: 0;
  }
}
dl {
  display: grid;
  grid-template-columns: 1fr auto;
  font-size: 13px;
  gap: 20px;
  margin: 30px 0;
}
dd {
  margin: 0;
  text-align: end;
  justify-self: end;
  font-variant-numeric: tabular-nums;
  font-weight: bold;
}
h3 {
  font:
    500 24px "Outfit",
    sans-serif;
}
.ribbons {
  display: grid;
  gap: 12px;
  margin: 25px 0;
}
.ribbon {
  padding: 15px;
  background: #eeeadf;
  border-radius: 8px;
  color: #999;
}
.ribbon.earned {
  background: #e5ead8;
  color: #576343;
}
.reset,
.test-results-link {
  background: none;
  color: #99785b;
  border: 1px solid #d8cdbb;
  padding: 10px;
  border-radius: 5px;
  font-size: 11px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .game {
    height: auto;
    min-height: 100dvh;
    grid-template-columns: 1fr;
  }
  .patch {
    height: 100dvh;
    min-height: 540px;
    padding: 40px 24px 24px;
  }
  aside {
    overflow-y: visible;
    padding: 32px 24px;
  }
}
@media (min-width: 801px) and (max-height: 650px) {
  .patch {
    padding-top: 20px;
  }
  .score {
    font-size: 50px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.harvest-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.test-results-link {
  display: inline-block;
  font-family: inherit;
  text-decoration: none;
}
