/* z20: the village hero, explore view, letters and challenges */
html:root body .vh{position:relative;overflow:hidden;background:linear-gradient(#0c1c15,#1d3d2b 70%,#24472f);color:#fff;min-height:clamp(560px,calc(100svh - 120px),780px);display:flex;flex-direction:column}
html:root body .vh .vh-art{position:absolute;inset:0;z-index:1}
html:root body .vh .vh-art>svg{position:absolute;inset:0;width:100%;height:100%;display:block}
html:root body .vh .vh-art>svg .sky,html:root body .vh .vh-art>svg .lbl{display:none}
html:root body .vh .vs-m{display:none!important}
html:root body .vh .vh-snow{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
html:root body .vh .vh-copy{position:relative;z-index:3;width:100%;padding-top:clamp(22px,2.6vw,44px);padding-bottom:24px}
html:root body .vh .vh-copy>*{max-width:560px}
html:root body .vh .crumbs{margin:0 0 6px;font-size:14px;color:#cfdccd}
html:root body .vh .crumbs a{color:#E3EDD3}
html:root body .vh .crumbs span{margin:0 6px;color:#9fb4a4}
html:root body .vh .crumbs span:last-child{margin:0;color:#cfdccd}
html:root body .vh h1{font-family:'Young Serif',Georgia,serif!important;font-weight:400!important;color:#fff!important;font-size:clamp(2.6rem,5vw,4.4rem)!important;line-height:1.02!important;letter-spacing:-.02em;margin:8px 0 10px;text-shadow:0 2px 18px rgba(0,0,0,.45)}
html:root body .vh .vh-lead{color:#E3EDD3;font-size:clamp(1.05rem,1.5vw,1.3rem);margin:0 0 18px;max-width:30ch;text-shadow:0 1px 8px rgba(0,0,0,.5)}
html:root body .vh .btns{display:flex;flex-wrap:wrap;gap:12px}
html:root body .vh .btn{min-height:48px}
html:root body .vh .btn[disabled]{opacity:.75;cursor:default}
html:root body .vh .btn.xh-ghost{background:transparent!important;color:#fff!important;border:2px solid rgba(255,255,255,.7)!important}
html:root body .vh .vh-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin:16px 0 0;font-size:16px}
html:root body .vh .vh-let{display:inline-flex;align-items:center;gap:8px;font-weight:800;color:#F4C24A}
html:root body .vh .vh-let:before{content:'';width:22px;height:22px;border-radius:6px;background:#fdf1d2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ctext x='11' y='16' text-anchor='middle' font-family='Georgia' font-size='14' fill='%231D3A2D'%3EA%3C/text%3E%3C/svg%3E") center/100% no-repeat;transform:rotate(-6deg)}
html:root body .vh-link{background:none;border:0;padding:4px 0;font:700 16px 'DM Sans',sans-serif;color:#fff;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
html:root body .vh-link:hover{color:#A9D18E}
html:root body .vh-link.dk{color:#1D3A2D;font-size:15px}
html:root body .vh .vh-cap{position:absolute;z-index:4;background:#fff;color:#1D3A2D;border:0;border-radius:12px;padding:8px 12px;font:600 14px/1.25 'DM Sans',sans-serif;box-shadow:0 6px 18px rgba(0,0,0,.35);cursor:pointer;max-width:240px;text-align:left}
html:root body .vh .vh-cap b{display:block;color:#C23B67;font-size:12px}
html:root body .vh .vh-cap:after{content:'';position:absolute;left:50%;bottom:-7px;margin-left:-7px;border:7px solid transparent;border-bottom:0;border-top-color:#fff}
html:root body .vh .vh-cap.edge-l:after,html:root body .vh .vh-cap.edge-r:after{display:none}
html:root body .vh .vh-cap.edge-l:before{content:'‹ ';font-weight:800}
html:root body .vh .vh-cap.edge-r b:after{content:' ›'}
html:root body .vh .vh-cap[hidden]{display:none}
html:root body :is(.vh,.vx) .lt{transition:opacity 1.2s}
html:root body :is(.vh,.vx) .lt.off{opacity:0}
html:root body :is(.vh,.vx) .eq{transition:transform 1.4s cubic-bezier(.3,1.5,.5,1),opacity .9s;transform-box:fill-box;transform-origin:50% 100%}
html:root body :is(.vh,.vx) .eq.off{opacity:0;transform:scale(.2) translateY(20px)}
html:root body :is(.vh,.vx) .tw{animation:adv-tw 2.4s ease-in-out infinite}
html:root body :is(.vh,.vx) .bank{transition:transform 1.5s}
html:root body :is(.vh,.vx) [data-spot].pulse{animation:vh-pulse 1.2s ease-in-out 2;transform-box:fill-box;transform-origin:50% 100%}
html:root body :is(.vh,.vx) .arrive{animation:vh-arrive 1.6s cubic-bezier(.3,1.6,.5,1)}
@keyframes vh-pulse{50%{filter:drop-shadow(0 0 10px #F4C24A) drop-shadow(0 0 4px #fff)}}
@keyframes vh-arrive{0%{transform:translateY(-120px) scale(.4);opacity:0}60%{opacity:1}100%{transform:none}}
@keyframes adv-tw{50%{opacity:.45}}
@media (max-width:760px){
html:root body .vh{min-height:0;display:flex;flex-direction:column;background:linear-gradient(#0c1c15,#16301f 60%,#1e3b29)}
html:root body .vh .vh-copy{order:1}
html:root body .vh .vh-art{order:2}
html:root body .vh .vh-art{position:relative;inset:auto;height:auto}
html:root body .vh .vs-d{display:none!important}
html:root body .vh .vh-pan{display:block}
html:root body .vh .vh-copy{padding-top:16px;padding-bottom:4px}
html:root body .vh .crumbs{font-size:13px}
html:root body .vh h1{font-size:calc((100vw - 40px) / 14.4)!important;white-space:nowrap;margin:4px 0 6px}
html:root body .vh .vh-lead{font-size:16px;margin:0 0 14px}
html:root body .vh .btns{gap:10px}
html:root body .vh .btns .btn{flex:1 1 auto;padding-inline:14px}
html:root body .vh .vh-row{margin-top:10px;font-size:15px}
html:root body .vh .vh-cap{font-size:13px;padding:5px 10px;max-width:none;white-space:nowrap}
html:root body .vh .vh-cap b{display:inline;font-size:13px;margin-right:4px}
html:root body .vh .vh-snow{height:100%}
}
@media (max-width:360px){html:root body .vh .btns .btn{flex:1 1 100%}}
@media(prefers-reduced-motion:reduce){html:root body :is(.vh,.vx) .tw,html:root body :is(.vh,.vx) .pulse,html:root body :is(.vh,.vx) .arrive{animation:none}
html:root body :is(.vh,.vx) .eq,html:root body :is(.vh,.vx) .lt{transition:none}}

/* explore the village */
html:root body .vx{position:fixed;inset:0;z-index:2100;background:#0c1c15;color:#fff;display:flex;flex-direction:column;--z:1}
html:root body .vx[hidden]{display:none}
html:root body .vx-head{display:flex;align-items:center;gap:10px;padding:12px max(16px,4vw);flex-wrap:wrap}
html:root body .vx-head h2{font-family:'Young Serif',Georgia,serif;font-weight:400;color:#fff!important;font-size:clamp(22px,3vw,30px);margin:0 auto 0 0}
html:root body .vx-head button{min-width:44px;height:44px;border-radius:12px;border:2px solid rgba(255,255,255,.6);background:transparent;color:#fff;font:800 20px 'DM Sans',sans-serif;cursor:pointer}
html:root body .vx-head button[disabled]{opacity:.35;cursor:default}
html:root body .vx-head .vx-close{background:#fff;color:#1D3A2D;border-color:#fff;padding:0 16px;font-size:16px}
html:root body .vx-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;cursor:grab;display:flex;align-items:flex-end;background:linear-gradient(#0c1c15,#2a5038)}
html:root body .vx-scroll.grab{cursor:grabbing}
html:root body .vx-scroll:focus-visible{outline:3px solid #F4C24A;outline-offset:-3px}
html:root body .vx-scroll svg{display:block;height:min(62vh,560px);width:auto;aspect-ratio:2640/470;max-width:none;flex:none}
html:root body .vx-note{margin:0;padding:8px max(16px,4vw) 0;color:#F4C24A;font-weight:700;min-height:1.4em}
html:root body .vx-go{display:flex;gap:8px;overflow-x:auto;padding:10px max(16px,4vw) calc(14px + env(safe-area-inset-bottom,0px))}
html:root body .vx-go button{flex:none;border:0;border-radius:999px;background:#A9D18E;color:#1D3A2D;font:700 14px 'DM Sans',sans-serif;padding:10px 14px;cursor:pointer}
html:root body .vx-go button:focus-visible,html:root body .vx-head button:focus-visible{outline:3px solid #F4C24A;outline-offset:2px}
html:root body .vx .lbl{display:none}
html:root body.vx-on{overflow:hidden}
@media (max-width:760px){html:root body .vx-head h2{font-size:22px}html:root body .vx-head{gap:8px}}

/* door tiles: the letter on an open door */
html:root body .adv .dr .in .tl{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;background:#1D3A2D;color:#fff}
html:root body .adv .dr .in .tl b{font:400 clamp(30px,4.4vw,48px)/1 'Young Serif',Georgia,serif;color:#fff}
html:root body .adv .dr .in .tl small{font:800 11px 'DM Sans',sans-serif;color:#A9D18E;margin-bottom:4px;letter-spacing:.02em}
html:root body .adv .dr.lettered .in{background:#1D3A2D}

/* the open door card */
html:root body .adv .rv-next{font-size:15px!important;color:#3d4a44!important;margin:-4px 0 12px!important}
html:root body .adv .rv-next[hidden],html:root body .adv .btns[hidden],html:root body .adv .rv-eq[hidden]{display:none}
html:root body .adv .rv-eq{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;background:#E3EDD3;border-radius:16px;padding:14px 16px;margin:14px 0 0}
html:root body .adv .rv-eq b{flex:1 1 220px;font:400 21px/1.2 'Young Serif',Georgia,serif;color:#1D3A2D}
html:root body .adv .rv-letter{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;align-items:center;background:#fdf1d2;border-radius:16px;padding:14px 16px;margin-top:14px}
html:root body .adv .rv-letter .lt-h{grid-column:1/-1;font:400 22px/1.1 'Young Serif',Georgia,serif;color:#1D3A2D}
html:root body .adv .scr{position:relative;width:132px;height:96px;border-radius:14px;background:#fff;border:2px solid #d9b96a;display:flex;align-items:center;justify-content:center;grid-row:span 3;overflow:hidden;touch-action:none}
html:root body .adv .scr:focus-visible{outline:3px solid #3557A6;outline-offset:3px}
html:root body .adv .scr-l{font:400 64px/1 'Young Serif',Georgia,serif;color:#1D3A2D}
html:root body .adv .scr canvas{position:absolute;inset:0;width:100%;height:100%;cursor:pointer;transition:opacity .4s}
html:root body .adv .scr.done canvas{opacity:0;pointer-events:none}
html:root body .adv .scr.done{border-color:#1D3A2D}
html:root body .adv .scr-hint{margin:0!important;font-weight:700;color:#1D3A2D!important;font-size:16px!important}
html:root body .adv .rv-letter .btn{justify-self:start}
html:root body .adv .rv-letter [hidden]{display:none!important}
html:root body .adv .scr-done{margin:0!important;font-size:16px!important;color:#1D3A2D!important}
html:root body .adv .scr-done b{font:400 22px 'Young Serif',Georgia,serif}
html:root body .adv .chs{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0}
html:root body .adv .ch{min-height:44px;border:2px solid #fff;background:transparent;color:#fff;border-radius:12px;padding:8px 14px;font:700 15px 'DM Sans',sans-serif;cursor:pointer;text-align:left}
html:root body .adv .ch:hover{background:rgba(255,255,255,.12)}
html:root body .adv .ch:focus-visible{outline:3px solid #F4C24A;outline-offset:2px}
html:root body .adv .ch.yes{background:#fff;color:#1D3A2D}
html:root body .adv .ch.yes:before{content:'✓ '}
html:root body .adv .ch.no{opacity:.6;text-decoration:line-through}
html:root body .adv .kfb{margin:8px 0 0!important;font-weight:700;min-height:0;font-size:16px!important}
html:root body .adv .kfb:empty{display:none}
html:root body .adv .kfb.ok{color:#F4C24A!important}
html:root body .adv .kid{align-items:start}
@media (max-width:600px){
html:root body .adv .rv-letter{gap:6px 12px;padding:12px}
html:root body .adv .scr{width:104px;height:80px}
html:root body .adv .scr-l{font-size:52px}
html:root body .adv .scr-hint{font-size:15px!important}
html:root body .adv .ch{font-size:14px;padding:8px 12px}
html:root body .adv .rv-eq b{font-size:19px}
html:root body .adv .tiles{grid-template-columns:repeat(auto-fill,minmax(38px,1fr))!important;gap:6px}
html:root body .adv .tile small{display:block!important;font-size:8px;left:3px;top:2px}
}
html:root body .adv .live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

html:root body .vx .vs-x rect.sky{display:none}

/* z20b: arrivals, tappable buildings, controls */
html:root body :is(.vh,.vx) .eq.drop{animation:vh-drop 1.3s cubic-bezier(.25,1.4,.5,1) both}
html:root body :is(.vh,.vx) .lt.flick{animation:vh-flick 1s steps(1,end) both}
@keyframes vh-drop{0%{transform:translateY(-320px) scale(.7) rotate(-8deg);opacity:0}25%{opacity:1}70%{transform:translateY(10px) scale(1.06,.94) rotate(1deg)}85%{transform:translateY(-6px)}100%{transform:none;opacity:1}}
@keyframes vh-flick{0%{opacity:0}15%{opacity:1}30%{opacity:.15}45%{opacity:1}60%{opacity:.35}75%,100%{opacity:1}}
html:root body .vh .vh-cap.pop{animation:vh-pop .7s cubic-bezier(.3,1.7,.5,1)}
@keyframes vh-pop{0%{transform:scale(.3);opacity:0}100%{transform:none;opacity:1}}
html:root body :is(.vs-d,.vs-m,.vs-x) [data-spot]{cursor:pointer}
html:root body :is(.vs-d,.vs-m,.vs-x) [data-spot]:hover{filter:brightness(1.18)}
html:root body .vh .vh-hint{position:absolute;z-index:4;right:max(16px,4vw);top:20px;margin:0;background:rgba(255,255,255,.14);color:#fff;font:700 14px 'DM Sans',sans-serif;padding:7px 12px;border-radius:999px;pointer-events:none}
html:root body .v-info{position:fixed;z-index:2300;width:min(280px,calc(100vw - 16px));background:#fff;color:#15201E;border-radius:16px;padding:14px 16px 16px;box-shadow:0 12px 34px rgba(0,0,0,.4);font:15px/1.4 'DM Sans',sans-serif}
html:root body .v-info[hidden]{display:none}
html:root body .v-info b{display:block;font:400 20px/1.15 'Young Serif',Georgia,serif;color:#1D3A2D;padding-right:28px;margin-bottom:4px}
html:root body .v-info p{margin:0 0 6px}
html:root body .v-info .vi-st{color:#C23B67;font-weight:700}
html:root body .v-info .btn{margin-top:6px;min-height:44px}
html:root body .v-info .vi-x{position:absolute;right:8px;top:8px;width:36px;height:36px;border:0;border-radius:50%;background:#eef2ea;color:#1D3A2D;font-size:20px;cursor:pointer}
html:root body .adv .adv-ctl{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
html:root body .adv .stagehead .count{color:var(--g);font-weight:800}
@media (max-width:760px){html:root body .vh .vh-hint{top:auto;bottom:calc(100% - 30px);right:12px;font-size:12px;padding:5px 10px}
html:root body .adv .adv-ctl .as-reset{flex:1 1 auto;font-size:14px}}
@media(prefers-reduced-motion:reduce){html:root body :is(.vh,.vx) .eq.drop,html:root body :is(.vh,.vx) .lt.flick,html:root body .vh .vh-cap.pop{animation:none}}

/* today's door in the hero: tap the number */
html:root body .vh .vh-btns{align-items:center}
html:root body .vh .vh-door{display:inline-flex;align-items:center;gap:14px;background:none;border:0;padding:0;color:#fff;cursor:pointer;text-align:left;font:inherit}
html:root body .vh .vh-door .vd{position:relative;width:64px;height:84px;border-radius:32px 32px 6px 6px;background:#C23B67;box-shadow:inset 0 0 0 4px rgba(255,255,255,.18),0 8px 20px rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;transition:transform .2s}
html:root body .vh .vh-door .vd-n{width:42px;height:42px;border-radius:50%;background:#F4F1EA;color:#1D3A2D;display:flex;align-items:center;justify-content:center;font:400 24px/1 'Young Serif',Georgia,serif}
html:root body .vh .vh-door .vd-k{position:absolute;right:8px;top:52px;width:8px;height:8px;border-radius:50%;background:#F4C24A}
html:root body .vh .vh-door .vd-l{display:flex;flex-direction:column;font:700 15px/1.25 'DM Sans',sans-serif;color:#E3EDD3}
html:root body .vh .vh-door .vd-l b{font:400 22px/1.15 'Young Serif',Georgia,serif;color:#fff}
html:root body .vh .vh-door:hover .vd,html:root body .vh .vh-door:focus-visible .vd{transform:translateY(-3px) rotate(-3deg)}
html:root body .vh .vh-door:focus-visible{outline:3px solid #F4C24A;outline-offset:6px;border-radius:10px}
html:root body .vh .vh-door:not(.done):not([disabled]) .vd{animation:vh-knock 3.2s ease-in-out infinite}
html:root body .vh .vh-door.done .vd{background:#1D3A2D;box-shadow:inset 0 0 0 3px #A9D18E,0 8px 20px rgba(0,0,0,.35)}
html:root body .vh .vh-door[disabled]{cursor:default;opacity:.85}
@keyframes vh-knock{0%,80%,100%{transform:none}84%{transform:rotate(-4deg)}88%{transform:rotate(3deg)}92%{transform:rotate(-2deg)}}
@media (max-width:760px){html:root body .vh .vh-btns{flex-wrap:nowrap;justify-content:space-between}
html:root body .vh .vh-btns .btn.xh-ghost{flex:0 1 auto}
html:root body .vh .vh-door .vd{width:54px;height:72px}html:root body .vh .vh-door .vd-n{width:36px;height:36px;font-size:20px}html:root body .vh .vh-door .vd-k{top:44px}
html:root body .vh .vh-door .vd-l b{font-size:19px}html:root body .vh .vh-door .vd-l{font-size:13px}}
@media (max-width:360px){html:root body .vh .vh-btns{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){html:root body .vh .vh-door .vd{animation:none!important}}

/* phones: a strip of the whole village you can swipe */
html:root body .vh .vh-pan{display:none;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
html:root body .vh .vh-pan::-webkit-scrollbar{display:none}
html:root body .vh .vh-pan svg{display:block!important;height:230px;width:auto;aspect-ratio:2640/272;max-width:none}
html:root body .vh .vh-pan svg rect.sky,html:root body .vh .vh-pan svg .lbl{display:none}
html:root body .vh .h-m{display:none}
html:root body .vh .vh-hint{transition:opacity .8s}
html:root body .vh .hint-gone .vh-hint{opacity:0}
html:root body .vh .vh-cap{transition:opacity .4s}
html:root body .vx .vx-snow{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
html:root body .vx>*:not(.vx-snow){position:relative;z-index:3}
html:root body .vx .vx-scroll{z-index:1}
@media (max-width:760px){
html:root body .vh .vh-pan{display:block}
html:root body .vh .h-m{display:inline}
html:root body .vh .vh-hint{top:10px;bottom:auto;left:50%;right:auto;transform:translateX(-50%);white-space:nowrap;font-size:12px;background:rgba(12,28,21,.7)}
html:root body .vh .vh-art .vh-snow{pointer-events:none}
}
