body{background:#243d2d}.review{color:#f5efd8;margin:10px auto;max-width:1400px}.review small{color:#c1d4af}.farm{width:min(100%,1440px);height:auto;aspect-ratio:3/2;border:0;border-radius:12px;background:#7bca32 url('farm-rich.png') center/100% 100% no-repeat;box-shadow:0 12px 40px #10201580;container-type:inline-size}.cloud,.hill,.barn,.fence,.sheep,.notice,.flowers,.subtitle{display:none}header{position:absolute;inset:0 0 auto;max-width:none;height:18%;padding:2% 2.5%;align-items:flex-start}.square{width:6%;height:auto;aspect-ratio:1;border-radius:23%;font-size:clamp(20px,3.6cqw,54px);background:radial-gradient(ellipse at 45% 10%,#328eba,#09578a 55%,#033151);border:2px solid #062638;box-shadow:inset 0 2px 2px #b9e8ec,0 4px 0 #002e4b,0 6px 4px #273e3d75;text-shadow:0 3px #00304c}.title{position:absolute;top:0;left:31%;width:38%;height:100%;background:url('sprites/sign-1.png') center top/100% auto no-repeat;border:0;border-radius:0;box-shadow:none;padding:0}.farm[data-stage="2"] .title{background-image:url('sprites/sign-2.png')}.farm[data-stage="3"] .title{background-image:url('sprites/sign-3.png')}.title:before,.title:after,.title small{display:none}.title h1{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#board{top:19%;width:72%;height:46%;left:50%}.farm[data-stage="1"] #board{top:21%;height:41%;width:65%}.tile{background:none;border:none;box-shadow:0 6px 3px #283f2159;border-radius:15%;padding:0;transition:filter .15s,transform .15s}.tile img{width:100%;height:100%;display:block;pointer-events:none;user-select:none}.tile:disabled{filter:brightness(.68) saturate(.8)}.tile.hinted{outline:4px solid #fff274;box-shadow:0 0 0 7px #f1c314,0 0 25px 12px #fff884;z-index:30!important;animation:pulse .7s infinite alternate}@keyframes pulse{to{filter:brightness(1.15)}}footer{bottom:8%;width:69%;height:24%;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:14px}#tray{width:100%;height:48%;align-items:center;gap:5px;padding:9px 12px;border:3px solid #75421b;border-radius:20px;background:repeating-linear-gradient(0deg,#a6541410 0 3px,#ffe6a110 4px 5px),linear-gradient(#f6c16a 0%,#c97b28 12%,#b6601e 82%,#eeab45 93%,#944913);box-shadow:inset 0 3px 1px #ffdf91,inset 0 -4px #9b501b,0 4px 0 #4b3015,0 7px 5px #23462788}.slot{width:calc((100% - 30px)/7);height:100%;max-height:var(--tile);max-width:var(--tile);background:linear-gradient(115deg,#563718,#71502b);border:1px solid #daa258;border-radius:11px;box-shadow:inset 2px 4px 5px #301c1490,0 1px #ffe59e}.slot .tile{top:-1px;left:-1px} .tools{width:78%;height:46%;margin:0;justify-content:space-between;gap:9%}.tools button{width:28%;height:100%;border-radius:23%;border:3px solid #b47904;background:radial-gradient(ellipse at 35% 0,#fffbb4,transparent 55%),linear-gradient(#ffcf34,#ffb400 78%,#ee8d00);box-shadow:inset 0 3px #fff6b5,0 5px #a56504,0 8px 5px #285c3b77;color:white;text-shadow:0 2px 0 #704219,-1px -1px #704219,1px -1px #704219}.tools button:nth-child(2){background:radial-gradient(ellipse at 35% 0,#c5fffb,transparent 55%),linear-gradient(#2ed5ff,#00a7f3 78%,#007ac7);border-color:#0872a4;box-shadow:inset 0 3px #bafaff,0 5px #075b8a,0 8px 5px #285c3b77;color:#fff}.tools button:nth-child(3){background:radial-gradient(ellipse at 35% 0,#ffd7e6,transparent 55%),linear-gradient(#ff92ba,#ff629c 78%,#e33676);border-color:#b73468;box-shadow:inset 0 3px #ffe1e7,0 5px #9d2859,0 8px 5px #285c3b77;color:#fff}.tools em{font-size:clamp(25px,4cqw,60px);line-height:.9;font-family:Arial,sans-serif}.tools span{font-size:clamp(13px,2cqw,28px);line-height:1.1;font-weight:900}.tools b{width:clamp(25px,3.7cqw,52px);height:clamp(25px,3.7cqw,52px);line-height:1.4;top:-12%;right:-4%;font-size:clamp(14px,2.5cqw,34px);border:2px solid white;background:radial-gradient(circle at 30% 20%,#ff745d,#e62920);text-shadow:none}#status{position:absolute;bottom:-20px;font-size:11px;background:#effad9bb;border-radius:10px;padding:1px 8px;color:#395527;margin:0}#reserve{display:none}.disclaimer{color:#c3cfb9}#overlay{border-radius:inherit}@media(max-width:650px){.review{padding:0 8px}.review strong{font-size:10px}.farm{aspect-ratio:auto;min-height:720px;height:calc(100svh - 49px);max-height:none;border-radius:0;background-size:auto 100%;background-position:center}.farm:before{content:'';position:absolute;inset:0;background:linear-gradient(180deg,transparent 0 20%,#b5e54320 30% 80%,transparent);pointer-events:none}header{height:16%;padding:20px 12px}.square{width:40px}.title{left:20%;width:60%;height:110px}.farm[data-stage="1"] #board,#board{top:25%;width:95%;height:40%}footer{bottom:10%;width:96%;height:22%;gap:12px}#tray{border-radius:13px;padding:7px 6px;gap:3px;height:42%}.slot{border-radius:6px}.tools{width:85%;height:48%;gap:9%}.tools button{border-width:2px}.tools em{font-size:34px}.tools span{font-size:16px}.tools b{width:27px;height:27px;font-size:18px}.tile{box-shadow:0 4px 2px #283f2159}#status{bottom:-27px;font-size:10px}.disclaimer{display:none}}
@media(max-width:650px){.farm{background-image:url('farm-portrait.png');background-size:cover}.farm[data-stage="1"] #board,#board{top:34%;height:31%}}
@media(min-width:651px){#board{top:15%;height:52%;width:78%}}
#tray{width:max-content;max-width:100%}.slot{width:var(--tile);height:var(--tile);flex-shrink:0}.tools em svg{height:100%;width:100%;filter:drop-shadow(0 2px 1px #674423)}.tools em{height:55%;margin:0 auto 2px;width:42%}#status{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(min-width:651px){footer{height:27%;bottom:6%}.tools{height:41%}#tray{height:calc(var(--tile) + 24px);min-height:calc(var(--tile) + 24px);flex-shrink:0}}
@media(max-width:650px){#tray{height:calc(var(--tile) + 18px);min-height:calc(var(--tile) + 18px);flex-shrink:0}}

/* English test update: slightly larger play area and tool symbols. */
.tools em{width:50%;height:59%;font-size:clamp(29px,4.5cqw,66px)}
.tools span{font-size:clamp(11px,1.6cqw,23px)}
#reserve:not([hidden]){display:flex;flex-wrap:wrap;justify-content:center;width:94%;gap:4px;bottom:auto;z-index:35;pointer-events:auto}
#reserve[hidden]{display:none}
#reserve .tile{position:relative;flex:0 0 var(--tile);box-shadow:0 3px 5px #243d2d66}
[hidden]{display:none!important}
@media(max-width:650px){.farm[data-stage="1"] #board,#board{top:31%;height:35%;width:98%}.tools em{font-size:39px}.tools span{font-size:13px}}
@media(min-width:651px){#board{width:84%;height:55%}}

/* Render the level sign as text so no baked-in Chinese remains. */
.farm .title,.farm[data-stage="2"] .title,.farm[data-stage="3"] .title{top:12px;height:auto;min-height:74px;padding:9px 5px;background:linear-gradient(#dfac68,#a86c30);border:3px solid #795026;border-radius:12px;box-shadow:inset 0 2px #ffe1a1,0 4px #53371e}
.title small{display:block;font-size:clamp(10px,2cqw,18px);letter-spacing:1px;line-height:1.2}
.title h1{position:static;width:auto;height:auto;clip-path:none;overflow:visible;font-size:clamp(22px,4cqw,38px);letter-spacing:1px;margin:5px 0 0;line-height:1.1}

.tile{overflow:hidden}.tile img{transform:scale(var(--face-scale,1.04));transform-origin:center;transition:transform .35s ease}
@media(prefers-reduced-motion:reduce){.tile img{transition:none}}

/* Larger faces in levels 2 and 3 without changing hit areas or tile coverage. */
#overlay article{max-height:85vh;overflow:auto} .country-results{font-size:14px;max-height:36vh;overflow:auto;margin:12px 0}.country-results table{width:100%;border-collapse:collapse}.country-results td,.country-results th{padding:6px;border-bottom:1px solid #d7c39b}.country-medal{font-size:48px;display:block}button{touch-action:manipulation}body{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}

.farm.at-home #board,.farm.at-home footer,.farm.at-home #reserve{visibility:hidden}.badge-launch{position:absolute;right:3%;top:14%;z-index:40;font-size:14px;padding:8px 12px;border-radius:12px;background:#fff4d1;color:#543814;border:2px solid #bd913d}#overlay article{min-width:0;width:min(92vw,520px)}

/* Three tools after removing Hint. */
.farm .tools{width:85%;gap:7%;justify-content:center}.farm .tools button{width:28%;flex:0 0 28%}.badge-launch{font-size:14px}.title small{letter-spacing:2px}.title h1{letter-spacing:3px}

/* More room for the 24-tile opening layer in level 3. */
@media(max-width:650px){.farm[data-stage="3"] #board{width:100%;height:37%;top:26%}}
@media(min-width:651px){.farm[data-stage="3"] #board{width:94%;height:48%;top:15%}}

html[lang="en"] .notice{max-width:42%;font-size:11px}html[lang="en"] .badge-launch{font-size:11px}html[lang="en"] #status{font-size:11px}html[lang="en"] .tools span{font-size:13px}

.ad-privacy{position:absolute;top:19%;left:3%;z-index:30;font-size:11px;padding:6px;border-radius:8px}

/* Three fixed reserve positions; later removals stack in the same positions. */
#reserve:not([hidden]){display:flex;width:174px!important;flex-wrap:nowrap;gap:12px;padding:0;background:none;border:none;box-shadow:none;left:50%;transform:translateX(-50%);height:66px;justify-content:center}
.reserve-pile{position:relative;width:46px;height:46px;flex:0 0 46px;border:1px dashed #71603b80;border-radius:7px}
#reserve .reserve-pile .tile{position:absolute;inset:0;width:46px;height:46px;z-index:4}
.reserve-back{position:absolute;inset:0;border-radius:7px;background:#d2b47b;border:1px solid #8d7039;box-shadow:0 2px #6c562f}
.pile-count{position:absolute;right:-5px;top:-6px;z-index:6;background:#754726;color:white;border-radius:10px;padding:1px 5px;font:12px system-ui;pointer-events:none}
.pile-cycle{position:absolute;top:48px;left:9px;width:28px;height:18px;padding:0;z-index:6;border:0;border-radius:7px;background:#fff1b9;color:#533c1c;font-size:16px;line-height:18px}

.farm[data-stage="3"]{width:min(100%,600px);height:max(760px,calc(100svh - 45px));aspect-ratio:auto;background-size:auto 100%;margin-left:auto;margin-right:auto}

#reserve:not([hidden]){width:138px!important;height:42px;gap:10px}#reserve .reserve-pile{width:36px;height:36px;flex-basis:36px}#reserve .reserve-pile .tile{width:36px;height:36px}.farm[data-stage="3"] #board .tile:hover{transform:none}

/* Concealed third-level faces reveal only their white card edges. */
.farm[data-stage="3"] #board .tile{background:#fffdf3;border:1px solid #d9d6c8;border-radius:12%}
.farm[data-stage="3"] #board .tile:disabled{filter:none;background:#fffdf3;box-shadow:0 2px 1px #8c8866}
.farm[data-stage="3"] #board .tile:disabled img{visibility:visible}
.farm[data-stage="3"] .reserve-back{background:#fffdf3;border-color:#d9d6c8;box-shadow:0 2px #a39e88}

.farm[data-stage="3"] #board .tile:disabled{filter:brightness(.78) saturate(.85)}

.farm[data-stage="3"] #board{transform:translateX(-50%) scale(1.334025);transform-origin:center center}

/* Keep level two upright and clear of the title on wide previews. */
.farm[data-stage="2"]{width:min(100%,600px);height:max(760px,calc(100svh - 45px));aspect-ratio:auto;background-size:auto 100%;margin-left:auto;margin-right:auto}

/* Shared portrait stage and complete-tile styling for all three levels. */
.farm[data-stage]{width:min(100%,600px);height:max(760px,calc(100svh - 45px));aspect-ratio:auto;background-size:auto 100%;margin-left:auto;margin-right:auto}
.farm[data-stage] #board{width:94%;transform:translateX(-50%) scale(1.334025);transform-origin:center center}
.farm[data-stage] #board .tile{background:#fffdf3;border:1px solid #d9d6c8;border-radius:12%}
.farm[data-stage] #board .tile:disabled{filter:brightness(.78) saturate(.85);box-shadow:0 2px 1px #8c8866}
.farm[data-stage] #board .tile:hover{transform:none}
@media(max-width:650px){.farm[data-stage] #board{width:100%}}

/* Larger, slightly lower selected-tile tray. */
.farm #tray{transform:scale(1.05,1.2);transform-origin:center center;max-width:95%}
.farm footer{height:auto;bottom:28px;gap:24px;justify-content:flex-start}
.farm .tools{transform:none;height:66px;flex-shrink:0}
.farm #status{bottom:-22px}

/* Phone preview: raise tray and tools together, retaining reserve clearance. */
.farm footer{bottom:100px}

/* Larger inner tray cells, independent of board tile scale. */
.farm #tray{width:92%;height:58px;min-height:58px;padding:5px 6px;gap:3px;flex-shrink:0}
.farm #tray .slot{flex:1 1 0;min-width:0;max-width:none;max-height:none;width:auto;height:42px;position:relative}
.farm #tray .slot .tile{inset:0;width:100%;height:100%;margin:0}

.farm #tray{width:81%;height:52px;min-height:52px;padding:4px 5px;gap:3px}
.farm #tray .slot{height:38px}

.farm #tray{width:74%;height:48px;min-height:48px;padding:4px 5px}
.farm #tray .slot{height:34px}

.farm #rankings{transform:scale(.5);transform-origin:left top}
.farm #country-badges{transform:scale(.5);transform-origin:right top}

.farm[data-stage]{min-height:0;max-width:100%;}

@media(max-height:650px){.farm .title{height:65px;min-height:0;padding:6px}.farm footer{bottom:70px;gap:16px}.farm .tools{height:54px}.farm header{height:90px}}
