html, body {
  margin: 0;
  height: 100%;
  background: #2a3826;
  font-family: Georgia, "Palatino Linotype", Palatino, serif;
  color: #f7efe2;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
#app { display: flex; height: calc(100% - 40px); max-width: 1100px; margin: 0 auto; }
#stage { flex: 1 1 58%; display: flex; align-items: center; justify-content: center; min-width: 0; }
#pasture {
  width: min(100%, 640px);
  height: auto;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  cursor: pointer;
  background: #7ea36c;
}
#shop {
  flex: 0 0 360px;
  background: #24301f;
  padding: 22px 22px 28px;
  overflow-y: auto;
  box-sizing: border-box;
}
h1 { margin: 0; font-size: 28px; font-weight: 700; color: #f4e4c1; }
.tag, .hint, .fine { color: #c9d4b8; font-size: 13px; line-height: 1.4; }
.fine { font-size: 11px; opacity: 0.8; }
.away {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: rgba(232, 168, 124, 0.18);
  border-radius: 8px;
  color: #f4e4c1;
  font-size: 13px;
  line-height: 1.35;
}
#wool-readout {
  background: rgba(244, 228, 193, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0 10px;
}
#wool-count { font-size: 30px; color: #f4e4c1; letter-spacing: 0.5px; }
#wool-kind, #wool-rate { font-size: 13px; color: #d7c7a4; }
h2 { margin: 10px 0 8px; font-size: 15px; color: #e8a87c; letter-spacing: 0.4px; }
button {
  display: block; width: 100%; text-align: left; margin: 0 0 8px;
  padding: 10px 12px; border: 0; border-radius: 10px;
  background: #f4e4c1; color: #2a2218; font-family: inherit; font-size: 13px; cursor: pointer;
}
button:hover { filter: brightness(1.05); }
button:disabled { background: #4a5844; color: #c9d4b8; cursor: default; filter: none; }
button .sub { display: block; font-size: 11px; opacity: 0.75; margin-top: 2px; }
#boost-btn { background: #e8a87c; }
button.farm-btn { background: #d8c4a0; }
button.farm-owned { background: #6e8b68; color: #f7efe2; }
.shop-tabs { display: flex; gap: 6px; margin: 12px 0 8px; }
.shop-tab {
  flex: 1 1 0; width: auto; margin: 0; padding: 8px 2px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #3a4a34; color: #c9d4b8; text-align: center;
}
.shop-tab.on { background: #f4e4c1; color: #2a2218; }
.tab-lab { font-size: 10px; line-height: 1.2; }
.tab-pic { display: block; width: 22px; height: 16px; margin: 0 auto 3px; position: relative; }
.tab-pic.barn::before {
  content: ""; position: absolute; left: 3px; right: 3px; bottom: 0; height: 9px;
  background: currentColor; border-radius: 1px;
}
.tab-pic.barn::after {
  content: ""; position: absolute; left: 1px; top: 1px; width: 0; height: 0;
  border-left: 10px solid transparent; border-right: 10px solid transparent;
  border-bottom: 7px solid currentColor;
}
.tab-pic.fence::before, .tab-pic.fence::after { content: ""; position: absolute; top: 1px; bottom: 1px; width: 3px; background: currentColor; }
.tab-pic.fence::before { left: 4px; box-shadow: 6px 0 0 currentColor, 12px 0 0 currentColor; }
.tab-pic.fence::after { left: 1px; right: 1px; top: 5px; height: 2px; width: auto; bottom: auto; }
.tab-pic.alpaca::before {
  content: ""; position: absolute; left: 2px; bottom: 0; width: 14px; height: 10px;
  background: currentColor; border-radius: 7px 7px 4px 4px;
}
.tab-pic.alpaca::after {
  content: ""; position: absolute; right: 2px; top: 0; width: 8px; height: 10px;
  background: currentColor; border-radius: 4px 4px 2px 2px;
}
.tab-pic.hat::before {
  content: ""; position: absolute; left: 1px; right: 1px; bottom: 3px; height: 4px;
  background: currentColor; border-radius: 4px;
}
.tab-pic.hat::after {
  content: ""; position: absolute; left: 6px; right: 6px; top: 1px; height: 9px;
  background: currentColor; border-radius: 3px 3px 0 0;
}
.tab-pic.puff::before {
  content: ""; position: absolute; left: 6px; top: 3px; width: 10px; height: 10px;
  background: currentColor; border-radius: 50%;
  box-shadow: -5px 3px 0 0 currentColor, 5px 3px 0 0 currentColor;
}
.buy-qty { display: flex; align-items: center; gap: 4px; margin: 0 0 10px; }
.qty-lab { font-size: 11px; color: #c9d4b8; margin-right: 2px; flex: 0 0 auto; }
.qty-chip {
  display: inline-block; width: auto; flex: 1; margin: 0; padding: 6px 0;
  text-align: center; background: #3a4a34; color: #c9d4b8; font-size: 12px;
}
.qty-chip.on { background: #e8a87c; color: #2a2218; }
.shop-panel.hidden, .hidden { display: none; }
@media (max-width: 800px) {
  #app { flex-direction: column; }
  #shop { flex: 1 1 auto; width: 100%; }
  #pasture { width: 100%; border-radius: 0; }
}

#studio-bar {
  position: relative;
  z-index: 20;
  flex: 0 0 40px;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #1c2619;
  color: #c9d4b8;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 0.92rem;
  box-sizing: border-box;
}
#studio-bar a {
  color: #f7efe3;
  font-weight: 700;
  text-decoration: none;
  margin-right: 0.45rem;
}
#studio-bar a:hover { text-decoration: underline; }
