:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', sans-serif; color: #40583e; background: #fdf6f8; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
button:focus-visible { outline: 3px solid #fff9df; outline-offset: 4px; }
.farm button:focus-visible { box-shadow: 0 0 0 6px #476e52; }
button svg { width: 100%; height: 100%; pointer-events: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.farm-shell { max-width: 450px; margin: 0 auto; background: #9dba7c; padding-bottom: env(safe-area-inset-bottom); }
.farm { position: relative; width: 100%; aspect-ratio: 450 / 700; overflow: hidden; isolation: isolate; background: #a6c186 url('./assets/scenery.svg?v=2') center / 100% 100% no-repeat; }
.farm-top { position: absolute; z-index: 3; top: 3.8%; left: 6%; right: 6%; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.farm-top h1 { display: flex; align-items: center; gap: 7px; margin: 0; padding: 10px 13px 10px 10px; border: 1px solid #fffaf0; border-radius: 14px; background: #fff9e8e8; box-shadow: 0 3px 0 #6d8c6b18; font-size: clamp(15px, 4.25vw, 18px); line-height: 1.25; letter-spacing: .04em; font-weight: 750; white-space: nowrap; }
.farm-top h1 svg { flex: 0 0 auto; width: 23px; height: 23px; }
.coin-count { display: flex; align-items: center; gap: 5px; min-height: 41px; max-width: 46%; padding: 4px 13px 4px 6px; background: #fff9e8ed; border: 1px solid #fffdf0; border-radius: 23px; box-shadow: 0 3px 0 #6d8c6b18; font-variant-numeric: tabular-nums; }
.coin-count svg { width: 30px; height: 30px; flex: 0 0 auto; }
.coin-count strong { overflow: hidden; text-overflow: ellipsis; font-size: 18px; letter-spacing: .01em; color: #79623e; }
.companion { position: absolute; top: 21%; right: 18%; width: 25%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: transparent; z-index: 2; }
.companion img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 2px #58754525); transition: transform .2s; }
.companion.is-happy img { animation: happy .55s ease; }
.reaction { position: absolute; top: -21%; right: -15%; display: grid; place-items: center; min-width: 43px; height: 35px; padding: 0 9px; border: 1px solid #fffdf1; border-radius: 16px 16px 16px 5px; background: #fff9eb; color: #ce8990; font-size: 24px; box-shadow: 0 3px 0 #6d8b3d16; transform: scale(0); transform-origin: 15% 100%; transition: transform .2s; }
.companion.is-happy .reaction { transform: scale(1); }
.plots { position: absolute; top: 39.5%; left: 9%; right: 9%; bottom: 23%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 12px 12px; }
.plot { position: relative; min-width: 0; min-height: 0; padding: 0; border: 2px solid #9f7951; border-radius: 26% 24% 24% 27% / 30% 27% 30% 28%; background: repeating-linear-gradient(0deg, transparent 0 12px, #79523625 13px 15px, #d3ac7e35 16px 17px), linear-gradient(165deg, #b9986d, #a48055); box-shadow: 0 5px 0 #7c6746, 0 8px 0 #73925738, inset 0 2px 0 #dec09880; transition: border-color .2s, filter .15s; }
.plot::before { content: ''; position: absolute; left: 14%; right: 14%; bottom: 17%; height: 10%; border-radius: 50%; background: #6e51332e; pointer-events: none; }
.plot[data-status='empty']::after { content: '+'; position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #f9e7bd55; border-radius: 50%; transform: translate(-50%, -50%); font-size: 23px; font-weight: 300; line-height: 1; color: #f9e7bdbb; background: #f8dfb10d; }
.plot[data-status='ready'] { border-color: #ffe4a0; background: repeating-linear-gradient(0deg, transparent 0 12px, #9c663322 13px 15px, #e4bf8033 16px 17px), linear-gradient(160deg, #c6a26a, #b48a50); box-shadow: 0 5px 0 #927044, 0 0 0 3px #fff0b43d, inset 0 2px 0 #ffe4ab88; }
.plant { position: absolute; width: 88%; height: 110%; bottom: 4%; left: 6%; filter: drop-shadow(0 4px 1px #68462630); transform-origin: 50% 90%; pointer-events: none; }
.plot[data-status='thirsty'] .plant, .plot[data-status='growing'] .plant { width: 78%; left: 11%; height: 105%; transform: scale(var(--growth, .7)); }
.plot[data-status='growing'] { background: repeating-linear-gradient(0deg, transparent 0 12px, #503e2f25 13px 15px, #b3a07b33 16px 17px), linear-gradient(160deg, #938160, #7e6d50); border-color: #7b6d4e; box-shadow: 0 5px 0 #696043, 0 8px 0 #73925738, inset 0 2px 0 #c2b28960; }
.plot-bar { position: absolute; bottom: 7%; left: 23%; width: 54%; height: 4px; border-radius: 3px; background: #473f2d55; overflow: hidden; pointer-events: none; }
.plot-bar i { display: block; height: 100%; background: #cbe1a1; border-radius: inherit; transform-origin: left; transform: scaleX(var(--progress, 0)); }
.plot[data-status='empty'] .plot-bar, .plot[data-status='ready'] .plot-bar, .plot[data-status='locked'] .plot-bar { display: none; }
.water-mark { position: absolute; top: -9px; right: -4px; width: 27px; height: 27px; padding: 3px; border-radius: 50%; border: 1px solid #e5f7f6; background: #f1fcf4; box-shadow: 0 2px 0 #3e777138; pointer-events: none; }
.harvest-mark { position: absolute; top: -8px; right: -3px; width: 29px; height: 29px; padding: 2px; border: 1px solid #fff4c9; border-radius: 9px; background: #fff5d6; box-shadow: 0 2px 0 #9e783e55; pointer-events: none; }
.plot[data-status='locked'] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 2px dashed #71905e80; background: #8fac6b33; box-shadow: inset 0 2px 3px #6d8b4f12; color: #57734f; }
.plot[data-status='locked']::before { display: none; }
.lock-mark { width: 24px; height: 24px; display: block; }
.plot-cost { display: flex; align-items: center; justify-content: center; height: 20px; gap: 1px; font-size: 12px; font-weight: 750; }
.plot-cost svg { width: 20px; height: 20px; }
.plot.is-affordable { border-style: solid; border-color: #ffedb3; background: #e0dfa4a8; box-shadow: 0 3px 0 #7f99524d, inset 0 1px 0 #fff6d9; color: #5e7148; }
.plot:disabled { opacity: .4; }
.plot.bump { animation: bump .3s ease; }
.seed-dock { position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 13px; padding: 10px 17px 12px; border-radius: 25px; background: linear-gradient(#fff9e7, #f0e2bd); border: 2px solid #fff8e2; box-shadow: 0 4px 0 #b2a67b, 0 7px 0 #73925728, inset 0 -2px 0 #e0cda1; }
.seed { position: relative; flex: 0 0 auto; width: clamp(52px, 15vw, 66px); height: clamp(52px, 15vw, 66px); padding: 3px; border-radius: 18px; border: 2px solid transparent; background: #dacead38; transition: background .15s, border-color .15s, transform .15s; }
.seed.is-selected { border-color: #6e9662; background: #d8e3ba; box-shadow: 0 3px 0 #81965d55, inset 0 1px 0 #f5f9d7; transform: translateY(-2px); }
.seed.is-selected::after { content: ''; position: absolute; top: -6px; right: -6px; width: 15px; height: 15px; border: 3px solid #fff8df; border-radius: 50%; background: #628655; }
.seed:disabled > svg { opacity: .36; filter: saturate(.65); }
.seed-lock { position: absolute; right: -3px; bottom: -3px; display: flex; align-items: center; gap: 1px; height: 22px; min-width: 33px; padding: 0 5px 0 2px; border: 1px solid #f5e8c7; border-radius: 12px; background: #fff9e8; color: #82704e; font-size: 11px; font-weight: 700; }
.seed-lock svg { width: 16px; height: 16px; }
.hint { position: absolute; bottom: 2%; left: 4%; width: 92%; margin: 0; min-height: 17px; text-align: center; font-size: 12px; color: #405c3c; letter-spacing: .04em; }
.save-warning { position: absolute; top: 11.5%; width: 100%; margin: 0; text-align: center; font-size: 11px; color: #774b35; }
.effects { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.float { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 2px; font-size: 22px; font-weight: 800; color: #fff9dd; text-shadow: 0 2px 2px #694b36; animation: float 1.1s ease-out forwards; }
.float svg { width: 27px; height: 27px; }
@keyframes float { from { opacity: 1; } to { transform: translate(-50%, -190%); opacity: 0; } }
@keyframes happy { 35% { transform: translateY(-9px) rotate(-5deg); } 70% { transform: translateY(-3px) rotate(4deg); } }
@keyframes bump { 40% { transform: scale(.94); } }
@media (hover: hover) { .plot:not(:disabled):hover { filter: brightness(1.08); } .seed:not(:disabled):hover { background: #dce6bd; } .companion:hover img { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 350px) { .farm-top { left: 5%; right: 5%; gap: 5px; } .farm-top h1 { gap: 5px; padding: 9px 10px 9px 8px; } .coin-count { gap: 2px; padding-right: 9px; } .coin-count strong { font-size: 16px; } .plots { gap: 13px 11px; } .plot[data-status='locked'] { gap: 0; } .lock-mark { width: 21px; height: 21px; } .plot-cost { height: 17px; font-size: 11px; } }
@media (max-width: 450px) { :root { background: #9dba7c; } }

.seed-lock[data-next='true'] { min-width: 45px; padding-bottom: 3px; overflow: hidden; }
.seed-lock[data-next='true']::after { content: ''; position: absolute; bottom: 0; left: 0; width: var(--unlock-progress, 0%); height: 3px; background: #6e9662; }
.seed.is-unlocked { animation: seed-unlock 1.2s ease-out; }
.coin-count strong { display: inline-block; }
.coin-count .is-earned { animation: coin-earned .65s ease-out; }
@keyframes coin-earned { 35% { transform: scale(1.16); color: #a16a10; text-shadow: 0 0 8px #ffe19b; } }
@keyframes seed-unlock { 35% { box-shadow: 0 0 0 4px #f4d57f, 0 0 16px #ffe5a4; } }
@media (prefers-reduced-motion: reduce) { .seed.is-unlocked, .coin-count .is-earned { animation: none; } }
