/* Ernteholm's title screen: tangible timber, parchment, brass and living land. */
body.at-main-menu #game-ui,body.at-main-menu .preview-bar,body.at-main-menu #performance-meter,body.at-main-menu #ego-toolbar,body.at-main-menu #joystick,body.at-main-menu #toast{display:none!important}
body.at-main-menu #scene{pointer-events:none}#main-menu{position:absolute;inset:0;z-index:20;isolation:isolate;color:#3b291b;font-family:Georgia,'Times New Roman',serif;animation:menu-arrive 1.2s ease both;overflow:hidden;background:linear-gradient(180deg,#d8e7db0a,transparent 65%,#1c3d3430)}
#main-menu *{box-sizing:border-box}.menu-shade{position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(90deg,#102b25b8 0%,#173b2e60 18%,#20433415 37%,transparent 60%),linear-gradient(0deg,#163c4250,transparent 24%)}
.menu-column{position:absolute;left:clamp(22px,4.7vw,96px);top:48%;transform:translateY(-50%);width:clamp(310px,30vw,440px);filter:drop-shadow(0 10px 15px #12251e55);transition:opacity .35s,filter .35s;z-index:2}.menu-sign{position:relative;aspect-ratio:2.03;margin:0 -12px -4px;z-index:3}.menu-sign>img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}.menu-sign h1{position:absolute;left:10%;right:10%;top:44%;margin:0;text-align:center;font-size:clamp(43px,4.3vw,64px);font-weight:700;line-height:1;letter-spacing:-2px;color:#fff0cc;text-shadow:0 3px 1px #281304,0 -1px #fff8d9,2px 5px 5px #1c1108;transform:translateY(-3%)}.menu-sign>span{position:absolute;left:14%;right:14%;top:77%;text-align:center;color:#d9b875;font:8px 'Trebuchet MS',sans-serif;letter-spacing:1.7px;white-space:nowrap}.menu-lantern{position:absolute;width:83px;height:182px;right:-46px;top:-75px;transform-origin:50% 0;animation:lantern-sway 6s ease-in-out infinite;filter:drop-shadow(0 7px 5px #10231f75);pointer-events:none}
.menu-timber{position:relative;padding:14px 24px 24px;background:repeating-linear-gradient(90deg,#4e2d15 0 2px,#80512a 2px 5px,#67411f 5px 9px,#79502b 9px 15px);border:5px solid #5b371e;border-top-width:0;border-radius:0 0 12px 12px;box-shadow:inset 3px 0 2px #bf9151,inset -4px 0 4px #28170d,0 5px 0 #382311;z-index:1}.menu-timber::before,.menu-timber::after{content:'';position:absolute;top:7px;bottom:13px;width:12px;pointer-events:none;background:linear-gradient(90deg,#3f2514,#a1733c 30%,#744a25 65%,#412a15);box-shadow:1px 0 3px #261c13}.menu-timber::before{left:5px}.menu-timber::after{right:5px}.menu-timber nav{display:flex;flex-direction:column;gap:8px}.timber-button{position:relative;display:flex;align-items:center;gap:17px;width:100%;height:57px;min-height:44px;padding:0 25px 0 21px;border:0;background:transparent url('assets/menu-button-cream.svg') center/100% 100% no-repeat;color:#38291d;text-shadow:0 1px #fff4d7;font:700 clamp(19px,1.62vw,25px) Georgia,serif;cursor:pointer;box-shadow:0 4px 3px #21130760;border-radius:9px;transition:filter .17s,scale .17s,color .17s;white-space:nowrap;text-align:left;transform:none!important}.timber-button svg{width:27px;height:27px;flex-shrink:0;fill:currentColor;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.timber-button svg path{fill-rule:evenodd}.timber-button.selected,.timber-button:hover,.timber-button:focus-visible{background-image:url('assets/menu-button-moss.svg');color:#fff5d9;text-shadow:0 2px 2px #293b0c}.timber-button:hover{filter:brightness(1.12);scale:1.015}.timber-button:active{scale:.99;filter:brightness(.98)}.timber-button:focus-visible{outline:2px solid #ffe3a0;outline-offset:3px}.timber-button i{position:absolute;right:19px;top:50%;width:5px;height:5px;background:#b58d53;border:1px solid #6d502c;border-radius:50%;box-shadow:0 1px 0 #fff0aa}.menu-vine{position:absolute;left:-32px;top:-50px;width:65px;height:calc(100% + 75px);pointer-events:none;z-index:3;filter:drop-shadow(2px 3px 1px #25341565)}.menu-flowers{position:absolute;left:-12px;right:-15px;bottom:-19px;color:#e5d9e7;font:36px Georgia;letter-spacing:27px;pointer-events:none;text-shadow:0 2px #9c833b,3px 7px 4px #1b34235c;white-space:nowrap}.menu-flowers span{color:#a0aa53;font-size:29px}.menu-smallprint{text-align:center;font:10px 'Trebuchet MS',sans-serif;letter-spacing:.6px;color:#e1e5cc;text-shadow:0 2px 4px #1e3529;margin:26px 0 0}
.menu-canopy{position:absolute;left:-4%;top:-19%;width:43%;height:28%;transform:rotate(-16deg);border-radius:10% 60%;background:linear-gradient(165deg,#1c3325 6%,#4e562a 16%,#546c2b 20%,#1d4527 30%,transparent 31%);filter:drop-shadow(2px 6px 4px #193b3430);opacity:.9;pointer-events:none}.menu-caption{position:absolute;right:7%;bottom:11%;color:#fff4d9;text-shadow:0 3px 15px #193835;pointer-events:none;text-align:right;opacity:.95}.menu-caption>span{font:9px 'Trebuchet MS',sans-serif;letter-spacing:3px}.menu-caption p{font-size:clamp(23px,2.3vw,37px);line-height:1.35;letter-spacing:-.5px;margin:13px 0}.menu-caption i{width:75px;height:2px;background:linear-gradient(90deg,transparent,#e7cf8b);display:block;margin-left:auto}.menu-footer{position:absolute;bottom:max(15px,env(safe-area-inset-bottom));left:28px;right:28px;display:flex!important;align-items:center;justify-content:space-between;gap:12px;height:auto!important;background:none!important;border:0!important;color:#edf0dccc!important;padding:0!important;font:10px 'Trebuchet MS',sans-serif;letter-spacing:1px;z-index:3}.menu-footer button{color:inherit;background:#173e3c55;border:1px solid #e1dfbf45;border-radius:18px;padding:7px 12px;font:10px 'Trebuchet MS',sans-serif;cursor:pointer}.menu-footer button:hover{background:#214d47bb}.menu-footer button:focus-visible{outline:2px solid #f6db8b}.menu-paper{position:absolute;top:50%;left:clamp(415px,40vw,640px);transform:translateY(-50%);width:min(520px,calc(100vw - 470px));max-height:calc(100dvh - 100px);overflow:auto;padding:30px 32px 22px;border:8px solid #8b633b;border-radius:15px;background:linear-gradient(130deg,#fff4d7,#eee0ba 80%);box-shadow:0 0 0 2px #392c1f,0 0 0 3px #c09b62,inset 0 0 35px #b18a4b35,0 18px 70px #102d3570;animation:paper-open .3s ease both;z-index:5;scrollbar-width:thin;scrollbar-color:#a18a60 #ede0bd}.menu-paper[hidden],.menu-rest-button[hidden]{display:none!important}.menu-paper header{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #b69a6570;padding-bottom:17px;margin-bottom:19px}.menu-paper header small{font:9px 'Trebuchet MS',sans-serif;letter-spacing:2px;color:#8b7347}.menu-paper h2{font:30px Georgia,serif;color:#4a3520;margin:7px 0 0;outline:0}.menu-paper header>button{border:0;background:transparent;color:#816e4a;font:30px Georgia;cursor:pointer;padding:4px}.menu-paper p{font:14px/1.7 Georgia,serif;color:#796345;margin:8px 0 19px}.menu-paper label{display:block;color:#664c2e;font:12px 'Trebuchet MS',sans-serif;margin:17px 0 7px}.menu-paper select,.menu-paper input[type=text],#menu-new-seed{display:block;width:100%;padding:12px;border:1px solid #b59c6d;border-radius:5px;background:#fff7e1;color:#463520;font:14px Georgia}.menu-paper input:focus,.menu-paper select:focus{outline:2px solid #99a05a;outline-offset:2px}.menu-note{font-size:12px!important;color:#937e5a!important}.menu-action{display:flex;align-items:center;justify-content:center;gap:17px;width:100%;min-height:48px;border:1px solid #4e6024;border-radius:7px;background:linear-gradient(#7c923c,#4b6c2f);box-shadow:inset 0 1px #d4dca575,0 3px 0 #364c21;color:#fff4d5;font:700 16px Georgia;cursor:pointer;margin:17px 0 11px;text-shadow:0 1px #3c4b24}.menu-action svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2}.menu-action:hover{filter:brightness(1.1)}.menu-action:disabled{opacity:.5;cursor:default}.menu-text-action{display:block;border:0;background:transparent;text-decoration:underline;color:#806739;cursor:pointer;font:12px 'Trebuchet MS',sans-serif;margin:17px auto 6px;padding:5px}.menu-panel-status{min-height:16px;font-size:12px!important;color:#8a4a34!important;margin-bottom:0!important}.menu-save-list{display:grid;gap:10px;max-height:330px;overflow:auto;padding:3px}.menu-save-card{display:flex;gap:14px;text-align:left;border:1px solid #b29c6d;background:#fff6df;border-radius:7px;overflow:hidden;padding:0;color:#58432d;cursor:pointer;min-height:108px;flex-shrink:0}.menu-save-card.chosen{outline:2px solid #718945;outline-offset:0;background:#f1f2d6}.menu-save-card>img,.save-no-image{width:128px;min-height:108px;object-fit:cover;flex-shrink:0;background:#d5dfba}.save-no-image{display:flex;align-items:center;justify-content:center;flex-direction:column;color:#69815d;padding:12px;text-align:center;gap:6px}.save-no-image svg{height:37px;width:37px;fill:currentColor}.save-no-image small{font:9px 'Trebuchet MS',sans-serif}.menu-save-card>span:not(.save-no-image){padding:13px 8px 12px 0;display:flex;flex-direction:column;gap:6px}.menu-save-card>span>small{font:8px 'Trebuchet MS',sans-serif;letter-spacing:1px;color:#7e8a52}.menu-save-card b{font:700 18px Georgia}.menu-save-card time,.menu-save-card em{font:10px 'Trebuchet MS',sans-serif;color:#93805b}.menu-empty{padding:25px;text-align:center;border:1px dashed #b5a177;border-radius:7px}.menu-setting{display:flex;align-items:center;justify-content:space-between;padding:20px 0;border-top:1px solid #bba67450;margin-top:20px;gap:20px}.menu-setting b{font-size:14px}.menu-setting small{display:block;font:11px 'Trebuchet MS',sans-serif;color:#917c58;margin-top:8px}.menu-setting button{background:#e2e7bc;border:1px solid #8d9e58;border-radius:15px;padding:7px 17px;color:#53642d;cursor:pointer}.menu-rest-button{position:absolute;left:50%;bottom:12%;transform:translateX(-50%);background:#f3ecd5e8;border:1px solid #bfae7d;border-radius:6px;padding:15px 28px;font:18px Georgia;color:#425b32;cursor:pointer}.quiet .menu-column,.quiet .menu-caption,.quiet .menu-footer{opacity:0;pointer-events:none}.graphics-open .menu-caption,#main-menu[data-panel] .menu-caption{opacity:0}.at-main-menu #graphics-sidebar{z-index:40}.at-main-menu #graphics-sidebar:not([hidden])~#main-menu{pointer-events:none}.at-main-menu #graphics-sidebar:not([hidden])~#main-menu .menu-column{pointer-events:auto}
@keyframes menu-arrive{from{opacity:0}to{opacity:1}}@keyframes paper-open{from{opacity:0;translate:15px 0}to{opacity:1;translate:0 0}}@keyframes lantern-sway{0%,100%{rotate:-2.5deg}50%{rotate:2.5deg}}
@media(min-width:1900px){.menu-column{left:8vw;width:440px}.menu-paper{left:39vw}.menu-caption{right:9%}}
@media(max-height:760px){.menu-column{width:340px;top:47%;left:35px}.timber-button{height:49px;font-size:22px}.menu-sign h1{font-size:51px}.menu-timber{padding:12px 22px 20px}.menu-timber nav{gap:7px}.menu-lantern{width:68px;height:150px;right:-39px;top:-54px}.menu-caption{bottom:13%}.menu-paper{padding:22px 25px;max-height:calc(100dvh - 65px)}}
@media(max-height:590px) and (min-width:701px){.menu-column{width:275px;left:30px;top:48%}.timber-button{height:36px;min-height:35px;font-size:17px;gap:12px;padding-left:18px}.timber-button svg{width:20px;height:20px}.menu-timber{padding:8px 18px 16px}.menu-timber nav{gap:5px}.menu-sign h1{font-size:41px}.menu-sign>span{font-size:6px;letter-spacing:1px}.menu-smallprint{font-size:8px;margin-top:20px}.menu-flowers{font-size:25px;letter-spacing:20px;bottom:-15px}.menu-lantern{top:-37px;right:-30px;width:54px;height:120px}.menu-paper{left:350px;width:min(510px,calc(100vw - 380px));padding:17px 22px}.menu-paper header{margin-bottom:10px;padding-bottom:10px}.menu-paper h2{font-size:26px}.menu-save-list{max-height:180px}.menu-caption p{font-size:24px}.menu-footer{font-size:8px;bottom:9px}}
@media(max-width:700px){.menu-column{width:min(315px,80vw);left:50%;translate:-50% 0;top:47%}.menu-sign h1{font-size:47px}.menu-sign>span{font-size:7px}.timber-button{height:45px;font-size:20px;gap:17px}.menu-timber{padding:10px 21px 20px}.menu-timber nav{gap:7px}.menu-caption{display:none}.menu-shade{background:linear-gradient(90deg,#18362925,#18362950,#18362920)}.menu-paper{inset:50% 16px auto;transform:translateY(-50%);width:calc(100vw - 32px);max-height:calc(100dvh - 70px);padding:24px;z-index:6}#main-menu[data-panel] .menu-column{opacity:.16;pointer-events:none}.graphics-open .menu-column{opacity:0;pointer-events:none!important}.menu-footer{left:15px;right:15px;font-size:8px;letter-spacing:0}.menu-version{display:none}.menu-footer button{font-size:9px;padding:7px 9px}.menu-lantern{right:-28px;top:-35px;width:60px;height:130px}.menu-vine{left:-22px;width:50px}.menu-save-card>img,.save-no-image{width:102px}.menu-paper h2{font-size:28px}}
@media(max-width:700px) and (max-height:650px){.menu-column{width:270px;top:46%}.menu-sign h1{font-size:40px}.timber-button{height:36px;min-height:36px;font-size:18px}.menu-timber nav{gap:5px}.menu-sign>span{font-size:6px}.menu-smallprint{font-size:8px}.menu-timber{padding:8px 19px 18px}.menu-flowers{bottom:-14px;font-size:27px;letter-spacing:18px}}
@media(prefers-reduced-motion:reduce){#main-menu,.menu-paper{animation:none}.menu-lantern{animation:none}.timber-button{transition:none}.timber-button:hover{scale:1}}

.menu-timber{background:#68401f url(assets/menu-wood.svg) center / 430px auto}.timber-button svg{fill:none}.timber-button[data-menu=new] svg,.timber-button[data-menu=edit] svg{fill:currentColor}.menu-column .timber-button{isolation:isolate}

@media(max-height:440px) and (orientation:landscape){.menu-column{width:230px;max-height:none;left:24px;translate:0 0;top:47%}.menu-sign h1{font-size:34px}.menu-sign>span{font-size:5px;letter-spacing:.7px}.menu-timber{padding:7px 15px 13px}.menu-timber nav{gap:3px}.timber-button{height:29px;min-height:29px;font-size:15px;gap:10px;padding:0 17px}.timber-button svg{width:17px;height:17px}.menu-smallprint{display:none}.menu-vine{width:45px;left:-24px}.menu-flowers{font-size:20px;letter-spacing:15px;bottom:-11px}.menu-lantern{height:95px;width:42px;top:-12px;right:-23px}.menu-paper{left:290px;width:calc(100vw - 315px);max-height:calc(100dvh - 40px);padding:14px 18px}.menu-paper h2{font-size:23px}.menu-paper p{font-size:12px;margin-bottom:10px}.menu-paper header{margin-bottom:10px;padding-bottom:10px}.menu-save-list{max-height:135px}.menu-save-card>img,.save-no-image{width:85px}.menu-footer{bottom:8px}.menu-action{min-height:36px;margin-top:10px;font-size:14px}}
@media(max-width:600px) and (max-height:440px) and (orientation:landscape){.menu-paper{left:14px;width:calc(100vw - 28px)}}

.menu-canopy{left:-5px;top:-8px;width:clamp(330px,37vw,640px);height:200px;transform:none;background:none;border-radius:0;opacity:.95}.menu-canopy svg{height:100%;width:100%}@media(max-width:700px){.menu-canopy{width:85vw;height:130px;opacity:.8}}

.island-size-control{margin:18px 0}.island-size-control label{display:flex;justify-content:space-between;gap:12px;align-items:center}.island-size-control output{font-weight:700;white-space:nowrap}.island-size-inputs{display:flex;align-items:center;gap:10px}.island-size-inputs input[type=range]{flex:1;min-width:0;accent-color:#718646}.island-size-inputs input[type=number]{width:72px;padding:8px;border:1px solid #b59c6d;border-radius:5px;background:#fff7e1;color:#463520;font:14px Georgia}.island-size-presets{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.island-size-presets button{padding:7px 10px;border:1px solid #b5a176;border-radius:5px;background:#f6edd5;color:#5d573c;font:12px Georgia;cursor:pointer}.island-size-presets button[aria-pressed=true]{background:#6f8348;color:#fff8dd;border-color:#526a31}.island-size-note{font-size:12px!important;line-height:1.5!important;margin:10px 0!important}.menu-paper input[type=range]{width:100%}

/* Standalone character view, rendered on the game's existing canvas. */
#main-menu.animation-open{background:none}
.animation-open .menu-column,.animation-open .menu-canopy,.animation-open .menu-footer,.animation-open .menu-shade{visibility:hidden;pointer-events:none}
.menu-animation-view{
 position:absolute;inset:0;z-index:7;display:grid;
 grid-template-columns:minmax(0,1fr) clamp(295px,34vw,435px);
 color:#402f21;
}
.animation-stage{position:relative;min-width:0;min-height:0;touch-action:none;cursor:grab}
.animation-stage:active{cursor:grabbing}
.animation-stage:focus-visible{outline:2px solid #e4cc91;outline-offset:-5px}
.animation-back{
 position:absolute;top:max(16px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));
 padding:10px 15px;border:1px solid #c9b58b88;border-radius:8px;background:#182d26cc;
 color:#fff1d1;font:14px 'Trebuchet MS',sans-serif;cursor:pointer;
}
.animation-stage-status,.animation-stage-hint{
 position:absolute;left:10px;right:10px;text-align:center;color:#f2e5c8;
 font:14px 'Trebuchet MS',sans-serif;margin:0;pointer-events:none;
}
.animation-stage-status{top:50%}
.animation-stage-hint{bottom:max(20px,env(safe-area-inset-bottom));font-size:12px;color:#e2d7b8}
.animation-panel{
 min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;
 touch-action:pan-y;
 padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) 24px;
 border-left:3px solid #a38558;background:linear-gradient(145deg,#fff5dc,#ece0c3);
 box-shadow:-12px 0 35px #0e221f45;
}
.animation-panel header{padding-bottom:16px;border-bottom:1px solid #a385585c}
.animation-panel header small{color:#785b3a;font:11px 'Trebuchet MS',sans-serif;letter-spacing:1.2px}
.animation-panel h2{font:clamp(23px,2.8vw,32px)/1.15 Georgia,serif;margin:6px 0 0;color:#473421}
.animation-panel fieldset{border:0;min-width:0;margin:0;padding:0}
.animation-panel fieldset:disabled{opacity:.55}
.animation-panel label{display:block;margin:16px 0 7px;font:13px 'Trebuchet MS',sans-serif;color:#644c34}
.animation-panel select{
 display:block;width:100%;min-height:42px;padding:8px 10px;border:1px solid #b59c6d;
 border-radius:6px;background:#fff8e6;color:#473421;font:15px Georgia,serif;
}
.animation-actions{display:flex;gap:8px;margin-top:12px}
.animation-actions button{
 flex:1;min-height:40px;padding:6px 10px;border:1px solid #798b59;border-radius:6px;
 color:#405335;background:#edf1d8;font:13px 'Trebuchet MS',sans-serif;cursor:pointer;
}
.animation-actions button:first-child{background:#4c653c;color:#fff7df;border-color:#435937}
.animation-panel .animation-range-label{display:flex;justify-content:space-between;gap:10px}
.animation-range-label output{font-variant-numeric:tabular-nums;color:#746045}
.animation-panel input[type=range]{width:100%;margin:0;accent-color:#5f7543}
.animation-checks{display:flex;flex-wrap:wrap;gap:5px 16px}
.animation-checks label{display:flex;align-items:center;gap:6px}
.animation-panel input[type=checkbox]{accent-color:#5f7543}
@media(max-width:700px) and (orientation:portrait){
 .menu-animation-view{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
 .animation-panel{max-height:57dvh;border-left:0;border-top:3px solid #a38558;padding:12px 17px max(14px,env(safe-area-inset-bottom));box-shadow:0 -10px 28px #0e221f45}
 .animation-panel header{padding-bottom:8px}
 .animation-panel label{margin-top:12px}
 .animation-stage-hint{bottom:10px}
}
@media(max-height:460px) and (orientation:landscape){
 .menu-animation-view{grid-template-columns:minmax(0,1fr) minmax(240px,40vw)}
 .animation-panel{padding:12px 16px}
 .animation-panel header{padding-bottom:8px}
 .animation-panel label{margin-top:10px}
}

.animation-library-status{color:#804b30;font:12px/1.45 'Trebuchet MS',sans-serif;margin:8px 0 0}
