/* A working combine is the sixth chapter's entrance. */
#world .harvest-chapter{background:none;box-shadow:none;backdrop-filter:none;padding:0;pointer-events:none;width:390px}
#world .harvest-chapter h2{color:#655426}
#world .harvest-chapter p{color:#7c693b}
#world .harvest-machine-hotspot{position:absolute;z-index:4;padding:0;border:0;background:none;cursor:pointer;touch-action:manipulation;border-radius:24%;min-width:44px;min-height:44px;outline-offset:4px;transform:none}
.harvest-machine-hotspot:focus-visible{outline:2px solid #fff4cf;box-shadow:0 0 0 5px #97703799}
.harvest-machine-hotspot:after{content:'';position:absolute;left:56%;top:43%;width:13px;height:13px;border:1.5px solid #fff6d9;border-radius:50%;box-shadow:0 0 0 5px #b0874355;animation:land-machine-beacon 3s ease-out infinite;pointer-events:none}
.harvest-entry-hint{position:absolute;left:50%;top:109%;transform:translateX(-50%);padding:5px 11px;border:1px solid #a38b5440;border-radius:20px;background:#fff6dee6;font-size:12px;letter-spacing:.04em;white-space:nowrap;color:#6c552f;text-shadow:0 1px 3px #fff9e6;opacity:.9;pointer-events:none}
.harvest-machine-hotspot:hover .harvest-entry-hint,.harvest-machine-hotspot:focus-visible .harvest-entry-hint{opacity:1}
.harvest-machine-hotspot.played:after{animation:none;opacity:.4}
body.overview .harvest-machine-hotspot{display:none}
body.prologue-active .harvest-machine-hotspot:after,body.outbound-active .harvest-machine-hotspot:after,body:has(dialog[open]) .harvest-machine-hotspot:after{animation-play-state:paused}

/* Generated watercolor speech balloon above the roadside speaker. */
.field-video-bubble{position:absolute;z-index:3;transform:translate(-50%,-100%);pointer-events:none}
.field-speech-trigger{position:relative;display:block;width:100%;min-width:44px;min-height:44px;padding:0;border:0;background:none;pointer-events:auto;touch-action:manipulation;outline-offset:4px;border-radius:50%}
.field-speech-art{position:relative;display:block;transform-origin:65% 100%;filter:drop-shadow(0 3px 4px #66532b20)}
.field-speech-art>img{display:block;width:100%;height:auto;pointer-events:none;user-select:none;-webkit-user-drag:none}
.field-speaking-dots{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:8%;width:32%;height:12%;justify-content:center}
.field-speaking-dots i{display:block;width:20%;aspect-ratio:1;border-radius:50%;background:#877442;opacity:.65}
.field-speech-hint{position:absolute;left:50%;top:100%;transform:translate(-50%,3px);color:#705c34;font-size:clamp(10px,1.2vw,12px);white-space:nowrap;text-shadow:0 1px 4px #fff9e9;pointer-events:none}
.field-video-bubble.is-visible .field-speech-art{animation:field-speech-float 2.8s ease-in-out infinite}
.field-video-bubble.is-visible .field-speaking-dots i{animation:field-speaking-dot 1.2s ease-in-out infinite}
.field-speaking-dots i:nth-child(2){animation-delay:.16s!important}
.field-speaking-dots i:nth-child(3){animation-delay:.32s!important}
.field-speech-trigger:hover .field-speech-art,.field-speech-trigger:focus-visible .field-speech-art{filter:drop-shadow(0 3px 6px #80662d50)}
@keyframes field-speech-float{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-8px) rotate(2deg)}}
@keyframes field-speaking-dot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-40%);opacity:1}}
body.overview .field-video-bubble{display:none}
body.prologue-active .field-speech-art,body.outbound-active .field-speech-art,body:has(dialog[open]) .field-speech-art{animation-play-state:paused}
.farmer-interview-dialog{width:min(1000px,var(--interview-width,92vw));max-height:var(--interview-height,86dvh);padding:18px 20px 20px;background:#fff9e9;overflow:auto}
.farmer-interview-dialog h2{margin:0 48px 14px 0;font-size:20px;line-height:1.4}
.farmer-interview-dialog video{display:block;width:100%;max-height:calc(var(--interview-height,86dvh) - 108px);aspect-ratio:16/9;object-fit:contain;border-radius:10px;background:#17271c;touch-action:auto}
.farmer-interview-status{margin:10px 0 0;font-size:12px;line-height:1.5}
@media(prefers-reduced-motion:reduce){.field-video-bubble.is-visible .field-speech-art,.field-video-bubble.is-visible .field-speaking-dots i{animation:none}}

#gameDialog.harvest-game[open]{padding:0;overflow:hidden;border:2px solid #718044;background:#b5ce7c;box-shadow:0 18px 70px #283c3266}
#gameDialog.harvest-game .game-board{height:100%;overflow:hidden}
.farm-harvest-stage{position:relative;flex:1;width:100%;height:100%;min-height:0;overflow:hidden;background:#b5ce7c;isolation:isolate;user-select:none;-webkit-user-select:none}
.farm-harvest-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:grab;outline-offset:-5px}
.farm-harvest-canvas.is-dragging{cursor:grabbing}
.farm-harvest-canvas:focus-visible{outline:3px solid #fff5b6}
.farm-heading{position:absolute;left:28px;top:24px;display:grid;gap:3px;color:#3f5d30;pointer-events:none;text-shadow:0 2px 0 #fff6d2,0 0 14px #fff6d2}
.farm-heading>span{font-size:12px;font-weight:700;letter-spacing:.18em}
.farm-heading>strong{font-size:clamp(26px,3vw,38px);font-weight:900;letter-spacing:.02em}
.farm-collection{position:absolute;right:88px;top:20px;display:flex;align-items:center;gap:5px;padding:5px 18px 7px 4px;border:2px solid #e7d39a;border-radius:18px;background:linear-gradient(#fff9dfec,#f6e9bcf0);box-shadow:0 3px 0 #8f743b50,0 5px 18px #33472520;pointer-events:none;min-width:178px}
.farm-collection img{display:block;width:64px;height:64px;object-fit:contain;transform-origin:center bottom;-webkit-user-drag:none}
.farm-collection>div{display:grid;gap:3px;min-width:80px}
.farm-collection>div>span{font-size:11px;font-weight:700;color:#7b733f;letter-spacing:.08em}
.farm-collection strong{font-size:25px;color:#a66824;line-height:1}
.farm-collection strong small{font-size:14px;color:#8a794d;font-weight:600}
.farm-meter{height:6px;width:100%;margin-top:3px;background:#ddcf9c;border-radius:6px;overflow:hidden;box-shadow:inset 0 1px 2px #806c3825}
.farm-meter i{display:block;height:100%;width:0;background:linear-gradient(#cad677,#859c3b);border-radius:6px}
.farm-controls{position:absolute;left:25px;bottom:22px;display:flex;gap:10px;z-index:3}
.farm-controls button{display:grid;place-items:center;width:46px;height:46px;border:2px solid #e9d59c;border-radius:14px;background:linear-gradient(#fff8dc,#f4dfa0);color:#6f7138;box-shadow:0 3px 0 #957e4155;font-size:24px;font-weight:700;cursor:pointer;touch-action:manipulation}
.farm-controls button:active{transform:translateY(2px);box-shadow:0 1px 0 #957e4155}
.farm-controls button:focus-visible{outline:2px solid #576835;outline-offset:4px}
.farm-controls button:disabled{opacity:.45;cursor:default}
.farm-drag-hint{position:absolute;left:50%;bottom:25px;transform:translateX(-50%);max-width:calc(100% - 270px);padding:10px 20px;border:1.5px solid #d4cf8b;border-radius:30px;background:#fff9ddee;color:#567036;font-size:14px;font-weight:700;letter-spacing:.04em;white-space:nowrap;box-shadow:0 3px 0 #6d7d392b;pointer-events:none}
.farm-status{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.farm-scene-note{position:absolute;right:25px;bottom:27px;color:#5a6e35;font-size:11px;letter-spacing:.06em;pointer-events:none;text-shadow:0 1px 3px #ebefb8}
.farm-completion{position:absolute;left:50%;top:15%;transform:translateX(-50%);display:grid;gap:3px;text-align:center;pointer-events:none;color:#6b792f;text-shadow:0 2px 0 #fffadd,0 0 18px #fff4b7}
.farm-completion>span{font-size:clamp(33px,4vw,49px);font-weight:900;color:#b27723;letter-spacing:.10em}
.farm-completion>strong{font-size:15px;letter-spacing:.10em}
#gameDialog.harvest-game.focused-complete .game-foot{bottom:23px;right:25px}
#gameDialog.harvest-game.focused-complete .farm-scene-note{display:none}
#gameDialog.harvest-game .game-foot .primary{background:linear-gradient(#839e44,#5d7935);border:2px solid #e9dea8;color:#fffadb;border-radius:15px;box-shadow:0 3px 0 #39502850;font-weight:700}
#gameDialog.harvest-game .close{background:linear-gradient(#fff8dc,#f4dfa0);color:#657036;border:2px solid #e9d59c;border-radius:14px;box-shadow:0 3px 0 #957e4155}
@media(max-height:600px),(orientation:portrait) and (max-width:760px){
  #world .harvest-chapter{width:300px}
  #world .harvest-chapter h2{font-size:29px}
  .harvest-entry-hint{font-size:10px;padding:4px 8px}
  .farm-heading{left:20px;top:17px}
  .farm-heading>strong{font-size:25px}
  .farm-heading>span{font-size:10px}
  .farm-collection{top:13px;right:74px;min-width:158px;padding:3px 11px 4px 2px;border-radius:14px}
  .farm-collection img{width:48px;height:48px}
  .farm-collection strong{font-size:22px}
  .farm-collection strong small{font-size:12px}
  .farm-controls{left:19px;bottom:16px;gap:8px}
  .farm-controls button{width:44px;height:44px;font-size:22px}
  .farm-drag-hint{bottom:17px;padding:9px 14px;font-size:12px;max-width:calc(100% - 240px)}
  .farm-scene-note{right:19px;bottom:21px;font-size:10px}
  .farm-completion{top:13%}
  .farm-completion>span{font-size:31px}
  .farm-completion>strong{font-size:12px}
  #gameDialog.harvest-game.focused-complete .game-foot{bottom:16px;right:19px}
}
@media(prefers-reduced-motion:reduce){.harvest-machine-hotspot:after{animation:none;opacity:.8}}

/* Picture-led harvest results: rice, coins and scattered grains carry the story. */
#gameDialog.harvest-game .farm-harvest-stage{container-type:size}
#gameDialog.harvest-game .farm-completion{inset:0;z-index:6;transform:none;display:grid;place-items:center;gap:0;padding:5cqh max(5cqw,calc(var(--window-left) + 20px)) 17cqh;color:#fff3d5;text-shadow:none;text-align:left;pointer-events:auto;background:linear-gradient(#28382066,#2a301275);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);animation:harvest-results-reveal .6s both}
#gameDialog.harvest-game .farm-completion::before{content:'';position:absolute;inset:2cqh 1.5cqw;border:1px solid #e5c77b26;pointer-events:none}
#gameDialog.harvest-game .is-complete .farm-collection{opacity:0}
#gameDialog.harvest-game.focused-complete .game-secondary{visibility:hidden;pointer-events:none}
.harvest-results{position:relative;width:min(100%,1240px);margin:auto}
.harvest-results-heading{display:flex;align-items:center;justify-content:center;gap:1.5cqw;margin-bottom:4cqh}
.harvest-results-heading>img{width:clamp(45px,9cqh,85px);height:clamp(45px,9cqh,85px);object-fit:contain;animation:harvest-basket-arrive .7s .1s both}
.harvest-results-heading h3{margin:0;font:600 clamp(28px,6cqh,58px)/1.2 'Songti SC','STSong',serif;letter-spacing:.1em;color:#fff0c2}
.harvest-results-heading>span{align-self:flex-end;margin-bottom:1cqh;font:500 clamp(11px,1.8cqh,16px)/1.4 Georgia,serif;color:#dbce95;white-space:nowrap}
.harvest-result-panels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2cqw}
.harvest-result-panel{min-width:0;padding:3cqh 2cqw 3.5cqh;color:#34553c;background:radial-gradient(ellipse at 50% 0%,#fffdf4,transparent 70%),#f8efd6;border:1px solid #e9d6a4;border-radius:5px 22px 5px 22px;box-shadow:0 12px 30px #072e2830;animation:harvest-panel-arrive .6s .15s both}
.harvest-result-panel:nth-child(2){animation-delay:.25s}
.harvest-result-panel:nth-child(3){animation-delay:.35s}
.harvest-result-panel h4{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 0 2cqh;font:600 clamp(15px,2.7cqh,24px)/1.4 'Songti SC','STSong',serif;letter-spacing:.04em}
.harvest-result-side dd small{font:400 clamp(10px,1.6cqh,13px)/1.2 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;color:#87866b;letter-spacing:0;white-space:nowrap}
.harvest-result-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5cqw}
.harvest-result-side{min-width:0}
.harvest-result-picture{position:relative;display:grid;place-items:center;height:25cqh;max-height:230px;min-height:65px;border-bottom:1px solid #b7ab752e;margin-bottom:2cqh;isolation:isolate}
.harvest-result-picture::after{content:'';position:absolute;bottom:5%;width:100%;height:12%;z-index:-1;border-radius:50%;background:#a79b4c18;filter:blur(6px)}
.harvest-result-side dl{margin:0}
.harvest-result-side dt{font-size:clamp(11px,1.8cqh,15px);color:#366447;line-height:1.4}
.harvest-result-side dt::before{content:'';display:inline-block;width:6px;height:6px;margin-right:6px;border-radius:50%;background:currentColor;vertical-align:middle}
.harvest-result-side dd{margin:.7cqh 0 0;font:500 clamp(22px,5cqh,47px)/1.15 Georgia,'Times New Roman',serif;letter-spacing:-.05em;font-variant-numeric:tabular-nums;white-space:nowrap;color:#2e6344}
.harvest-result-side.is-manual :is(dt,dd){color:#918b72}
.harvest-data-track{height:clamp(4px,.7cqh,7px);margin-top:1.4cqh;border-radius:2px;overflow:hidden;background:#e1dfc6}
.harvest-data-track i{display:block;width:var(--bar-size);min-width:2px;height:100%;border-radius:2px;background:#44734d;transform-origin:left;animation:harvest-bar-grow 1s .6s both}
.harvest-result-side.is-manual .harvest-data-track i{background:#b5ae93}
.harvest-panel-output .harvest-result-side:not(.is-manual) .harvest-data-track i{background:linear-gradient(90deg,#44734d 50%,#8d9e64 50%)}
/* The combine clears the illustrated field; the sickle cuts a single tuft. */
.harvest-mini-field{position:relative;width:100%;height:82%;align-self:end;margin-bottom:8%;background:linear-gradient(165deg,#d6bb73,#ac964f);border-radius:50% 10% 35% 15%;isolation:isolate}
.harvest-mini-crops{position:absolute;inset:-15% -3% 10%;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(5,minmax(0,1fr));overflow:hidden}
.harvest-mini-crops img{min-width:0;min-height:0;width:145%;height:160%;object-fit:contain;margin-left:-20%;animation:harvest-crop-cut .3s calc(.65s + var(--order)*.065s) both}
.harvest-mini-field.is-manual .harvest-mini-crops img{animation:none;filter:saturate(.6)}
.harvest-mini-field.is-manual .harvest-mini-crops img:first-child{animation:harvest-crop-cut .4s 1.8s both}
.harvest-mini-combine{position:absolute;width:120%;height:90%;left:-10%;top:-15%;object-fit:contain;filter:drop-shadow(0 4px 3px #354b342a);animation:harvest-combine-pass 1.7s .35s both}
.harvest-mini-sickle{position:absolute;width:70%;height:70%;left:5%;top:0;filter:drop-shadow(0 3px 2px #354b3430);transform-origin:25% 80%;animation:harvest-sickle-cut .8s .5s 2 both}
/* Equal coin sizes: three coins versus fifteen express the 1:5 cost ratio. */
.harvest-coin-pile{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:end;gap:0;width:100%;height:90%;padding-bottom:8%;color:#ca9d3f}
.harvest-coin-pile svg{display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 2px 1px #8c6b2530);animation:harvest-coin-drop .45s calc(.55s + var(--order)*.055s) both}
.harvest-coin-pile.is-manual{filter:saturate(.45)}
/* Rice settles in the basket while a few loose grains drop into the foreground. */
.harvest-grain-scene{position:relative;width:100%;height:100%}
.harvest-grain-scene>img{position:absolute;left:0;top:1%;width:100%;height:75%;object-fit:contain;animation:harvest-basket-arrive .6s .45s both}
.harvest-grain-scene.is-manual>img{filter:saturate(.5)}
.harvest-spilled-grains{position:absolute;inset:76% -4% 2%}
.harvest-spilled-grains i{position:absolute;left:var(--grain-x);top:var(--grain-y);width:clamp(4px,.6cqw,9px);height:clamp(8px,1.2cqw,18px);border-radius:75% 25% 70% 30%;background:linear-gradient(90deg,#ae7f29,#f4d475 55%,#d1a543);box-shadow:1px 2px 1px #80682420;rotate:var(--grain-turn);animation:harvest-grain-fall .65s calc(.7s + var(--order)*.09s) both}
.harvest-grain-scene.is-manual .harvest-spilled-grains{filter:saturate(.6)}
@keyframes harvest-results-reveal{from{opacity:0}to{opacity:1}}
@keyframes harvest-panel-arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes harvest-basket-arrive{from{opacity:0;transform:translateY(10px) scale(.8)}to{opacity:1;transform:none}}
@keyframes harvest-bar-grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes harvest-crop-cut{to{opacity:0;transform:scale(.4) translateY(8px)}}
@keyframes harvest-combine-pass{0%{transform:translate(-8%,-5%) rotate(-4deg)}100%{transform:translate(8%,35%) rotate(-4deg)}}
@keyframes harvest-sickle-cut{0%,100%{transform:rotate(-20deg)}50%{transform:rotate(25deg)}}
@keyframes harvest-coin-drop{from{opacity:0;transform:translateY(-16px)}to{opacity:1;transform:none}}
@keyframes harvest-grain-fall{0%{opacity:0;transform:translateY(-50px)}30%{opacity:1}80%{transform:translateY(2px)}100%{opacity:1;transform:none}}
@container (max-height:450px){
  #gameDialog.harvest-game .farm-completion{padding-top:4cqh;padding-bottom:21cqh}
  .harvest-results-heading{margin-bottom:3cqh}
  .harvest-results-heading>img{width:12cqh;height:12cqh}
  .harvest-results-heading h3{font-size:8cqh}
  .harvest-result-panel{padding:2.4cqh 2cqw 3cqh;border-radius:3px 15px 3px 15px}
  .harvest-result-panel h4{font-size:clamp(13px,4cqh,16px);margin-bottom:1.5cqh}
  .harvest-result-picture{height:24cqh;margin-bottom:1.5cqh}
  .harvest-result-side dd{font-size:clamp(21px,6cqh,25px)}
}
@container (max-width:650px){
  .harvest-result-panels{gap:2cqw}
  .harvest-result-panel{padding-left:1.7cqw;padding-right:1.7cqw}
  .harvest-result-panel h4{font-size:13px;gap:4px}
  .harvest-result-side dd small{font-size:9px}
  .harvest-result-pair{gap:1.3cqw}
  .harvest-result-side dd{font-size:20px}
  .harvest-result-side dt{font-size:10px}
  .harvest-result-side dt::before{width:4px;height:4px;margin-right:4px}
}
@media(prefers-reduced-motion:reduce){
  #gameDialog.harvest-game .farm-completion,#gameDialog.harvest-game .harvest-results *{animation:none!important}
  .harvest-mini-field:not(.is-manual) .harvest-mini-crops img{opacity:0}
  .harvest-mini-field.is-manual .harvest-mini-crops img:first-child{opacity:0}
  .harvest-mini-combine{transform:translate(8%,35%) rotate(-4deg)}
}

/* Keep each value and its unit together, including the narrow phone panels. */
.harvest-result-side dd{display:flex;align-items:baseline;gap:.2em;font-size:clamp(16px,3cqw,40px);letter-spacing:-.04em}
.harvest-panel-output .harvest-result-side dd{font-size:clamp(14px,2.5cqw,34px)}
.harvest-result-side dd small{flex:none;font:400 clamp(8px,.95cqw,13px)/1.2 var(--font-body);letter-spacing:0;color:inherit}
.harvest-result-number{flex:none}
