/* Shared woodland materials: carved map plaques and parchment on an oak desk. */
#welcome-sign{container-type:inline-size}
#welcome-sign .sign-inscription{left:35.5%;top:25%;width:49%;height:43%;align-items:center;text-shadow:0 1px 0 #eabc7b}
#welcome-sign .sign-inscription strong,#world.overview #welcome-sign .sign-inscription strong{font-size:clamp(9px,3.6cqw,13px);line-height:1.4;letter-spacing:0;margin:0 0 7px;white-space:nowrap;color:#442914}
#welcome-sign .sign-inscription span,#world.overview #welcome-sign .sign-inscription span{font-size:clamp(10px,4.5cqw,16px);line-height:1.32;font-weight:700;color:#442914;display:block}
.place{width:168px;height:62px;min-width:0;padding:12px 20px;border:0;background:url('/assets/ui/destination-plaque.png') center/100% 100% no-repeat;box-shadow:none;text-align:center;color:#402711;text-shadow:0 1px #f0c380;display:flex;flex-direction:column;justify-content:center;align-items:center;filter:drop-shadow(1px 3px 1px #17200c66)}
.place strong{font-size:12px;line-height:1.15;color:#402711;white-space:nowrap}
.place small{font-size:11px;line-height:1.15;margin-top:3px;color:#4a301b;white-space:nowrap}
.place:hover{filter:brightness(1.08) drop-shadow(1px 3px 1px #17200c66);transform:translate(-50%,-50%)}
.place:focus-visible{outline:2px dashed #ffe1a0;outline-offset:3px}
#world.overview .place{width:clamp(80px,16%,168px);height:44px;padding:9px 6px}
#world.overview .place strong{font-size:9px}
#world.overview .place small{display:none}

.content-dialog,.content-dialog[data-place=lore]{padding:12px 16px 18px;border:3px solid #654328;background:#49301f url('/assets/ui/oak.webp') center/512px;max-height:calc(100dvh - 40px);box-shadow:inset 0 0 0 1px #aa7b45,0 18px 65px #070b06b3;overflow:hidden;color:#3a2b1c}
.content-dialog{width:540px}.content-dialog[data-place=lore]{width:780px}
.content-dialog::backdrop{background:#0d180ec4;backdrop-filter:blur(2px)}
.content-dialog .panel-head{background:none;border:0;padding:3px 2px 14px;gap:12px;color:#f2d6a1;text-shadow:0 2px #2b1b10}
.content-dialog .panel-head .pixel{font-size:13px;line-height:1.5}
.content-dialog .panel-head button{flex:none;background:#ddc494;color:#3d2917;border:2px solid #8a613a;box-shadow:1px 2px #23170ea6;text-shadow:none;padding:9px 12px;min-height:44px}
.content-dialog .panel-body{position:relative;flex:1 1 auto;min-height:0;margin:0;padding:34px 32px 38px;background:linear-gradient(#fff1d33b,#fff1d33b),url('/assets/ui/parchment.webp') center top/512px;border:1px solid #dbc18c;box-shadow:inset 0 0 36px #a66e2329,0 5px 10px #1c110f9c;line-height:1.65;font-size:16px;color:#3e2d1e;scrollbar-color:#947146 #decb9e;clip-path:polygon(0 0,17% .3%,34% 0,53% .35%,76% 0,100% .2%,99.7% 24%,100% 48%,99.6% 74%,100% 100%,78% 99.7%,58% 100%,32% 99.6%,0 100%,.3% 75%,0 49%,.3% 23%)}
.content-dialog .panel-body h2{color:#3f4929;font-size:22px;line-height:1.45;letter-spacing:-.02em;margin-bottom:18px}
.content-dialog .panel-body h3{color:#50562f;line-height:1.5}
.content-dialog .panel-body .small{color:#68543a}
.content-dialog .panel-body button:not(.primary){background-color:#e4cea0;color:#44311b;border-color:#957047;box-shadow:inset 0 1px #fff1cb}
.content-dialog .panel-body button[aria-selected=true],.content-dialog .panel-body button[aria-pressed=true]{background:#3e5932;color:#fff0cd;border-color:#354b2a;box-shadow:none}
.content-dialog .panel-body .action{box-shadow:1px 2px #8873443d}
.content-dialog .panel-body input[type=text],.content-dialog .panel-body select{background:#f6e8c7;border-color:#a08050;color:#3e2d1e}
.content-dialog .panel-body .rule,.content-dialog .school-tabs,.content-dialog .friend-gifts{border-color:#b69b66}
.content-dialog .friend-portrait{gap:18px;padding-bottom:20px;border-bottom:1px solid #bba374;margin-bottom:22px}
.content-dialog .friend-portrait img{width:80px;height:100px;filter:drop-shadow(2px 3px 0 #99784530)}
.content-dialog .friend-portrait h2{margin:0}
.content-dialog .friend-response{border-left:2px solid #aa8955;padding-left:18px}
.content-dialog .friend-response #friend-words{font-size:20px;line-height:1.7}
.content-dialog .secret-collection{background:#251b35;color:#dfefde;border-color:#9f6daf}
.content-dialog .secret-collection h3{color:#e9b2ee}
.game-overlay>div{background:#eddbad url('/assets/ui/parchment.webp') center/512px;border:8px solid #624429;box-shadow:inset 0 0 25px #a3772933,5px 7px #0b140ba3}
@media(max-width:700px){
 .place{width:158px;height:59px;padding:12px 17px}.place strong{font-size:11px}.place small{font-size:10px}
 .content-dialog,.content-dialog[data-place=lore]{width:calc(100% - 16px);max-width:calc(100% - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);margin:8px;padding:8px 8px 12px;border-width:2px}
 .content-dialog .panel-head{padding:2px 2px 10px;gap:8px}.content-dialog .panel-head .pixel{font-size:11px}.content-dialog .panel-head button{font-size:12px;padding:8px 10px}
 .content-dialog .panel-body{padding:26px 20px 32px;font-size:16px;line-height:1.65}.content-dialog .panel-body h2{font-size:20px}
 .content-dialog .friend-response #friend-words{font-size:19px}.content-dialog .school-tabs{gap:5px}.content-dialog .school-tabs button{font-size:12px;padding:9px 5px}
 .content-dialog .settings-row{gap:12px}.content-dialog .settings-row button{flex:none}
}
@media(max-width:360px){.content-dialog .panel-body{padding:22px 15px 28px}.content-dialog .panel-body h2{font-size:18px}.content-dialog .panel-head .pixel{font-size:10px}.content-dialog .friend-portrait{gap:12px}.content-dialog .friend-portrait img{width:64px;height:80px}}
@media(max-height:500px) and (orientation:landscape){.content-dialog,.content-dialog[data-place=lore]{height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);margin:8px auto;padding:8px 12px 12px}.content-dialog .panel-head{padding:0 0 8px}.content-dialog .panel-body{padding:22px 26px}.content-dialog .friend-portrait{padding-bottom:12px;margin-bottom:14px}.content-dialog .friend-portrait img{height:70px}}
/* Short conversations read as individual sheets rather than full-height panels. */
.content-dialog:is([data-place=friend],[data-place=secret],[data-place=x]){height:fit-content;max-height:calc(100dvh - 32px);margin:auto;padding:14px 18px 20px}
@media(max-width:700px){.content-dialog:is([data-place=friend],[data-place=secret],[data-place=x]){padding:10px 10px 14px}}

/* Invisible hit regions follow the doors, book, fire and other painted objects. */
.landmark-target{position:absolute;z-index:19000;padding:0;min-height:0;border:0;background:transparent;box-shadow:none;cursor:pointer;touch-action:manipulation}
.landmark-target:hover{background:#ffe9a80a;box-shadow:inset 0 0 14px #ffdd7833}
.landmark-target:focus-visible{outline:2px dashed #ffe49b;outline-offset:3px;background:#ffe9a812}
.secret-lamp:after{content:'';position:absolute;left:40%;top:47%;width:5px;height:5px;background:#fff4b0;box-shadow:0 0 8px 3px #ffd57199;opacity:0;pointer-events:none;clip-path:polygon(40% 0,60% 0,60% 40%,100% 40%,100% 60%,60% 60%,60% 100%,40% 100%,40% 60%,0 60%,0 40%,40% 40%)}
.secret-lamp.key-hint:after{animation:key-glint 7s ease-in-out infinite}
@keyframes key-glint{0%,65%,100%{opacity:0;transform:scale(.7)}75%,81%{opacity:.95;transform:scale(1.8)}88%{opacity:0;transform:scale(.8)}}
@media(prefers-reduced-motion:reduce){.secret-lamp.key-hint:after{animation:none;opacity:.6}}
body.reduce-motion .secret-lamp.key-hint:after{animation:none;opacity:.6}
/* The gate uses the same carved oak and leafy frame as the village signs. */
.entrance-choices button{width:360px;min-height:0;height:118px;padding:28px 46px;border:0;background:transparent url('/assets/ui/destination-plaque.png') center/100% 100% no-repeat;box-shadow:none;image-rendering:pixelated;color:#57351a;text-shadow:0 1px #ffe0a0;filter:drop-shadow(0 5px 4px #111b0b70)}
.entrance-choices button:hover{background:transparent url('/assets/ui/destination-plaque.png') center/100% 100% no-repeat;filter:brightness(1.1) drop-shadow(0 5px 4px #111b0b70);transform:translateY(-2px)}
.entrance-choices button span{font-size:14px;line-height:1.55}
.entrance-choices button:focus-visible{outline:2px dashed #fff0c4;outline-offset:5px}
/* One continuous outline keeps the curved speech tail joined to the parchment. */
.gate-greeting{min-height:90px;padding:22px 28px;border:0;border-radius:0;background:none;box-shadow:none;color:#49351f;text-shadow:none;font-size:14px;line-height:1.4;text-align:center;filter:drop-shadow(2px 4px 2px #111b0b55)}
.gate-greeting:before,.gate-greeting:after{display:none}
.greeting-shape{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:-1}
.gate-greeting>span{position:relative}

@media(max-width:600px){.entrance-choices button{width:320px;max-width:100%;height:105px;padding:24px 40px}.entrance-choices button span{font-size:12px}}
@media(max-height:500px) and (orientation:landscape){.entrance-choices button{height:94px;padding:20px 38px}.gate-greeting{min-height:82px;padding:18px 24px;font-size:12px}}

/* All four cats share a fixed proportion of the source map and visible body height. */
#world{--world-cat-size:8.5%}
#world #player,#world .villager{width:var(--world-cat-size);height:auto;aspect-ratio:1}
/* A dark oak lintel keeps the woodland controls readable without covering the view. */
.masthead{position:relative;background:#49301f url('/assets/ui/oak.webp') center/512px;border-bottom:3px solid #94703e;box-shadow:inset 0 1px #b89455,inset 0 -5px #24190e66;gap:14px}
.masthead .brand{color:#f7d594;text-shadow:1px 2px #24180f;letter-spacing:.03em}
.masthead .brand span{color:#e5cfaa;letter-spacing:0;text-shadow:0 1px #24180f}
.masthead .header-note{color:#e4ceaa;text-shadow:0 1px #24180f}
.masthead #sound-main,.masthead #settings-open{flex:none;width:112px;min-height:44px;height:48px;padding:10px 15px;border:0;background:transparent url('/assets/ui/destination-plaque.png') center/100% 100% no-repeat;box-shadow:none;color:#4a2e17;font-size:12px;text-shadow:0 1px #ffe1a0;image-rendering:pixelated}
.masthead #sound-main:hover,.masthead #settings-open:hover{filter:brightness(1.12)}
.masthead a:focus-visible,.masthead button:focus-visible{outline:2px dashed #ffe3a8;outline-offset:2px}
.neon-forest .masthead{background:#342034 url('/assets/ui/oak.webp') center/512px;background-blend-mode:luminosity;border-color:#b87cac}
.neon-forest .masthead .brand{color:#caffdf}
.map-caption{bottom:max(8px,env(safe-area-inset-bottom));gap:6px;flex-wrap:wrap}
.map-caption p,.map-caption button{border:0;background:transparent url('/assets/ui/destination-plaque.png') center/100% 100% no-repeat;box-shadow:none;color:#4a2e17;text-shadow:0 1px #ffe1a0;image-rendering:pixelated;text-align:center;line-height:1.35}
.map-caption p{max-width:min(510px,100%);min-height:62px;padding:20px 44px;font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center}
.map-caption button{min-height:54px;padding:16px 28px;font-size:12px;font-weight:700;max-width:100%}
.map-caption button:hover{filter:brightness(1.1)}
.map-caption button:focus-visible{outline:2px dashed #ffe3a8;outline-offset:2px}
@media(max-width:700px){
 .masthead{padding-inline:max(8px,env(safe-area-inset-left));gap:4px}
 .masthead .brand{font-size:17px}.masthead .brand span{font-size:9px}
 .masthead #sound-main,.masthead #settings-open{width:74px;height:44px;padding:10px 8px;font-size:10px}
 .map-caption{left:8px;right:8px;bottom:max(6px,env(safe-area-inset-bottom));gap:2px}
 .map-caption p{font-size:12px;min-height:64px;padding:19px 36px}
 .map-caption button{font-size:12px;min-height:50px;padding:14px 27px}
 .map-caption:has(#skip-walk:not([hidden])) #travel-status{display:none}
}
@media(max-height:500px) and (orientation:landscape){.masthead{padding-block:3px}.masthead #sound-main,.masthead #settings-open{height:44px}.map-caption p{min-height:48px;padding:14px 34px;font-size:12px}.map-caption button{min-height:46px;padding:13px 26px}}

.community-links{display:grid;gap:14px;margin:24px 0 28px}
.content-dialog .community-links .action{display:flex;align-items:center;justify-content:space-between;min-height:52px;width:100%;margin:0;padding:14px 18px;line-height:1.4}
.carved-chart{position:absolute;left:13.736979%;top:45.703125%;width:18.9453125%;height:22.75390625%;pointer-events:none}
.carved-chart svg{display:block;width:100%;height:100%;shape-rendering:crispEdges}
.content-dialog[data-place=x]{width:min(1060px,calc(100% - 32px));height:min(800px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:12px 16px 18px}
.content-dialog[data-place=x] .panel-body{display:flex;flex-direction:column;overflow:hidden;padding:20px;clip-path:none;min-height:0}
.market-heading{flex:none}.content-dialog .market-heading h2{margin:0 0 3px;font-size:18px}.content-dialog .market-heading p{font-size:14px;margin:0 0 14px}
.market-frame{flex:1;min-height:140px;padding:9px;border:2px solid #9f7544;background:#49301f url('/assets/ui/oak.webp') center/512px;box-shadow:inset 0 0 0 2px #372317,0 3px 0 #aa8a51}
.market-frame iframe{display:block;width:100%;height:100%;border:0;background:#fff;filter:sepia(.18)}
.market-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:14px;flex:none;font-size:12px;line-height:1.5}.market-footer a{color:#40502b;text-underline-offset:3px;font-weight:700}
@media(max-width:700px){.content-dialog[data-place=x]{width:calc(100% - 12px);max-width:calc(100% - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);padding:8px;margin:6px}.content-dialog[data-place=x] .panel-body{padding:12px 6px}.market-frame{padding:4px}.market-footer{gap:8px;font-size:11px}.content-dialog .community-links .action{padding:14px;min-height:52px}}
@media(max-height:500px) and (orientation:landscape){.content-dialog[data-place=x] .panel-body{padding:6px 12px}.market-heading{display:none}.market-footer{padding-top:7px}.market-frame{padding:4px}}
