/* Both chapters share the animated village tableau. */
.village-stage.ch-town-stage{container-type:size;background:#52675a!important;isolation:isolate}
.ch-town-stage::before,.ch-town-stage::after,.ch-town-stage>.village-scrim,.ch-town-stage>#village-seats,.ch-town-stage>.village-centre,.ch-town-stage>.stage-plaque,.ch-town-stage>.ch-village-life,.ch-town-stage>.ch-night-windows{display:none!important}
.ch-town-scene{position:absolute;inset:0;z-index:1;overflow:hidden;isolation:isolate;--town-actor-height:clamp(46px,13cqh,86px);--town-actor-width:calc(var(--town-actor-height)*.9);color:#fff1ce;pointer-events:none}
.ch-town-ground{position:absolute;inset:0;z-index:-3;background-image:var(--town-sheet);background-position:center;background-size:cover;filter:saturate(.88);pointer-events:none}
.ch-town-scene::before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;background:radial-gradient(ellipse at 50% 48%,transparent 32%,#122b2840 100%)}
.ch-town-scene.is-night .ch-town-ground{filter:brightness(.49) saturate(.72) hue-rotate(10deg)}
.ch-town-scene.is-night::before{background:radial-gradient(ellipse at 50% 50%,#315a7b15,#060c2961)}
.ch-town-roads{position:absolute;left:17%;right:17%;top:24%;bottom:18%;z-index:-2;border:clamp(5px,2cqw,15px) solid #d0c1a518;border-radius:50%;box-shadow:inset 0 0 0 1px #f2e6c11f,0 0 0 1px #293b3520;pointer-events:none}
.ch-town-dais{position:absolute;left:50%;top:57%;width:23%;height:11%;transform:translate(-50%,-50%);z-index:0;border:2px solid #d8c7a754;border-radius:50%;background:radial-gradient(ellipse,#7d81708f,#495c5680);box-shadow:0 6px 0 #354b4266,0 10px 12px #172b2433;text-align:center;pointer-events:none}
.ch-town-dais-seal{display:block;font:400 clamp(12px,4cqw,33px)/1.4 var(--serif);color:#e6d6b659;letter-spacing:.12em;transform:scaleY(.6)}
.ch-town-scene[data-stage="trial"] .ch-town-dais{background:radial-gradient(ellipse,#cab87a8c,#58625991);box-shadow:0 6px 0 #354b4280,0 0 35px #f6d88b42}
.ch-town-scene.is-night .ch-town-dais{filter:brightness(.55)}
.ch-town-lot{position:absolute;inset:0;pointer-events:none}
.ch-town-house{position:absolute;width:clamp(48px,20cqh,124px);height:clamp(48px,20cqh,124px);transform:translate(-50%,-50%);z-index:1;pointer-events:none;filter:drop-shadow(0 5px 3px #11231f40)}
.ch-town-house-art{position:absolute;inset:0;background-image:var(--town-sheet);background-size:var(--town-sheet-size);background-position:var(--town-sheet-position);background-repeat:no-repeat}
.ch-town-house-number{position:absolute;left:50%;bottom:8%;transform:translateX(-50%);padding:1px 4px;border:1px solid #cabb8c75;border-radius:3px;background:#26382edb;color:#e2d4ac;font:600 clamp(6px,1.5cqw,9px)/1.3 var(--sans);box-shadow:0 1px 3px #0005}
.ch-town-house[data-occupied="false"]{opacity:.52;filter:grayscale(.38) drop-shadow(0 4px 3px #14292340)}
.ch-town-house[data-state="dead"] .ch-town-house-art,.ch-town-house[data-state="departed"] .ch-town-house-art{filter:saturate(.25) brightness(.73)}
.ch-town-house-windows{position:absolute;left:34%;top:49%;width:10%;height:10%;border-radius:1px;background:#e7bb6a;box-shadow:23px 0 #e7bb6a,0 0 10px 3px #efbc6a30;mix-blend-mode:screen;opacity:0;pointer-events:none}
.ch-town-door{position:absolute;left:45%;bottom:13%;width:12%;height:24%;border-radius:40% 40% 0 0;background:linear-gradient(#ffd58c,#a47746);box-shadow:0 6px 12px 3px #f5bc5936;opacity:0;mix-blend-mode:screen}
.ch-town-scene.is-night .ch-town-house-art{filter:brightness(.69) saturate(.76)}
.ch-town-scene.is-night .ch-town-house[data-state="house"] .ch-town-house-windows,.ch-town-scene.is-night .ch-town-house[data-state="house"] .ch-town-door{opacity:.72}
.ch-town-lot:is(.is-selected,:has(.seat.ch-night-selected),:has(.seat:focus-visible),:has(.seat:hover)) .ch-town-house[data-occupied="true"]{filter:drop-shadow(0 0 5px #ffe3a7) drop-shadow(0 5px 5px #101e2580)}
.ch-town-lot.is-me .ch-town-house-number{color:#24332b;background:#e8c77f;border-color:#f2dca6}
.ch-town-actor{position:absolute;width:var(--town-actor-width);height:var(--town-actor-height);transform:translate(-50%,-100%);pointer-events:none}
.ch-town-stage .ch-town-seat.seat{position:absolute;inset:0;width:100%;height:100%;min-height:44px;left:0;top:0;transform:none;padding:0;background:none;border:0;border-radius:8px;display:block;pointer-events:auto;touch-action:manipulation}
.ch-town-stage .ch-town-seat .seat-portrait{display:block;position:absolute;inset:0;width:100%;height:100%;border:0!important;border-radius:6px;background:none!important;box-shadow:none!important;overflow:visible;transform:none;filter:none;animation:none!important;translate:none!important;rotate:none!important}
.ch-town-stage .ch-town-seat .seat-portrait::before,.ch-town-stage .ch-town-seat .seat-portrait::after{display:none!important}
.ch-town-shadow{position:absolute;left:20%;right:20%;bottom:-2%;height:10%;border-radius:50%;background:#122b276b;filter:blur(1px)}
.ch-town-figure{position:absolute;inset:0;transform-origin:50% 95%;pointer-events:none;filter:drop-shadow(1px 2px 1px #11292360)}
.ch-town-sprite{position:absolute;left:50%;top:0;width:var(--town-crop-width,50%);height:100%;translate:-50% 0;background-image:var(--town-sheet);background-size:var(--town-sheet-size);background-position:var(--town-sheet-position);background-repeat:no-repeat;pointer-events:none;transform-origin:50% 80%}
.ch-town-sprite:not(.ch-town-sprite--still){display:none}
.ch-town-sprite--torso{clip-path:polygon(0 0,100% 0,100% 35%,74% 35%,68% 74%,32% 74%,26% 35%,0 35%)}
.ch-town-sprite--arm-left{clip-path:polygon(0 35%,26% 35%,35% 73%,0 73%);transform-origin:28% 39%}
.ch-town-sprite--arm-right{clip-path:polygon(74% 35%,100% 35%,100% 73%,65% 73%);transform-origin:72% 39%}
.ch-town-sprite--leg-left{clip-path:polygon(0 70%,50% 70%,50% 100%,0 100%);transform-origin:40% 70%}
.ch-town-sprite--leg-right{clip-path:polygon(50% 70%,100% 70%,100% 100%,50% 100%);transform-origin:60% 70%}
.ch-town-stage .ch-town-seat .seat-label{position:absolute;left:50%;top:100%;transform:translateX(-50%);width:max-content;max-width:min(75px,11cqw);margin:2px 0 0;padding:2px 4px;border:1px solid #e2d4ab38;border-radius:3px;background:#17312dde;color:#fff0d1;font:600 clamp(8px,1.35cqw,9px)/1.4 var(--sans);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;box-shadow:0 2px 5px #11211f38}
/* Side neighbours are close vertically: put their names toward their homes,
   beside the figure, so a nameplate never cuts across the next resident. */
.ch-town-stage .ch-town-lot:is([data-slot="3"],[data-slot="4"],[data-slot="5"],[data-slot="6"]) .ch-town-actor[data-position="meeting"]:not(.is-travelling) .seat-label{left:calc(100% + 2px);top:55%;transform:translateY(-50%);margin:0}
.ch-town-stage .ch-town-lot:is([data-slot="11"],[data-slot="12"],[data-slot="13"],[data-slot="14"]) .ch-town-actor[data-position="meeting"]:not(.is-travelling) .seat-label{left:auto;right:calc(100% + 2px);top:55%;transform:translateY(-50%);margin:0}
.ch-town-stage .ch-town-seat .seat-number{left:50%;bottom:0;transform:translateX(-50%);width:15px;height:15px;font-size:8px;line-height:13px;border:1px solid #e4d0a0;background:#2a3d34;color:#ffe3ad;box-shadow:0 1px 4px #12272370}
.ch-town-stage .ch-town-seat.is-me .seat-number{background:#e7c682;color:#26372f}
.ch-town-stage .ch-town-seat .seat-badge{right:-2px;top:auto;bottom:17px;font-size:5px;padding:1px 2px}
.ch-town-stage .ch-town-seat .seat-votes{right:50%;top:-18px;transform:translateX(50%);font-size:8px;min-width:27px;height:17px;line-height:12px;z-index:3}
.ch-town-indoors{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);padding:2px 4px;border:1px solid #d4bc7950;background:#233226cc;color:#ecd9ad;border-radius:3px;font:500 7px/1.3 var(--sans);letter-spacing:.03em}
.ch-town-actor[data-position="house"] .ch-town-figure,.ch-town-actor[data-position="house"] .ch-town-shadow{opacity:0}
.ch-town-actor[data-position="house"].is-travelling .ch-town-figure,.ch-town-actor[data-position="house"].is-travelling .ch-town-shadow{opacity:1}
.ch-town-actor.is-travelling .ch-town-indoors{visibility:hidden}
.ch-town-actor.is-travelling .ch-town-figure{scale:var(--town-facing,1) 1}
.ch-town-actor.is-travelling .ch-town-sprite--still{display:none}
.ch-town-actor.is-travelling .ch-town-sprite:not(.ch-town-sprite--still){display:block}
.ch-town-grave{display:none;position:absolute;bottom:0;left:27%;width:46%;height:40%;border-radius:45% 45% 4px 4px;background:linear-gradient(110deg,#bdc8b6,#778d82);border:1px solid #54695d;box-shadow:inset 0 0 0 3px #627b6870,2px 3px 4px #1b2a283b}
.ch-town-grave::after{content:'†';position:absolute;inset:0;color:#405b4c;text-align:center;font:400 clamp(14px,5cqh,31px)/1.1 Georgia,serif}
.ch-town-actor[data-position="dead"] .ch-town-grave{display:block}
.ch-town-actor[data-position="dead"] .ch-town-figure{filter:grayscale(1) brightness(1.5);opacity:.3;translate:0 -9px}
.ch-town-actor[data-position="departed"] .ch-town-figure{filter:grayscale(1);opacity:.3}
.ch-town-actor[data-position="dead"] .ch-town-shadow{opacity:.3}
.ch-town-stage .ch-town-seat:is(:hover,:focus-visible) .ch-town-figure,.ch-town-stage .ch-town-seat:is(.ch-town-selected,.ch-night-selected) .ch-town-figure{filter:drop-shadow(0 0 4px #ffdf91) drop-shadow(0 0 1px #fff2bd)}
.ch-town-stage .ch-town-seat:focus-visible{outline:2px solid #ffdf9a;outline-offset:5px}
.ch-town-stage .ch-town-seat:is(.ch-town-selected,.ch-night-selected) .seat-label{border-color:#eecb82;background:#495032}
.ch-town-stage .ch-night-target-ring,.ch-town-stage .ch-target-halo,.ch-town-stage .ch-trial-spotlight,.ch-town-stage .ch-lively-ripple{inset:auto 3% -6%;height:26%;border-radius:50%;pointer-events:none}
.ch-town-caption{position:absolute;bottom:5px;left:50%;transform:translateX(-50%);max-width:90%;z-index:10;pointer-events:none;font:500 clamp(6px,1.35cqw,9px)/1.4 var(--sans);letter-spacing:.07em;color:#eadcba;text-align:center;padding:3px 9px;background:#203b32b8;border:1px solid #d9c58d33;border-radius:10px;white-space:nowrap}
.ch-town-atmosphere{position:absolute;inset:0;z-index:7;overflow:hidden;pointer-events:none;opacity:.35}
.ch-town-haze{position:absolute;left:-25%;width:150%;height:25%;bottom:12%;background:radial-gradient(ellipse,#dae4c72e,transparent 67%);pointer-events:none}
.ch-town-haze--far{bottom:auto;top:26%;opacity:.6}
.ch-town-scene.is-night .ch-town-atmosphere{opacity:.75}
.ch-town-stage .ch-trial-stage{top:16%;width:39%;max-width:220px;transform:translateX(-50%)}
.ch-town-stage .ch-trial-stage-body{padding:8px 10px;border-radius:12px}
.ch-town-stage .ch-trial-portrait{display:none}
.ch-town-stage .ch-trial-stage-title{font-size:clamp(17px,4cqw,25px)}
.ch-town-stage .ch-trial-stage-eyebrow{margin-bottom:4px}
.ch-town-stage .ch-trial-stage-name{margin-top:4px}
.ch-town-stage .ch-trial-stage-detail{margin-top:3px}
.ch-town-stage .ch-ability-scene{z-index:3;top:52%}
html.motion-enabled:not(.motion-paused) .ch-town-ground,html.motion-enabled:not(.motion-paused) .ch-town-house-art{transition:filter 1.5s ease}
html.motion-enabled:not(.motion-paused) .ch-town-door,html.motion-enabled:not(.motion-paused) .ch-town-house-windows{transition:opacity 1.3s ease}
html.motion-enabled:not(.motion-paused) .ch-town-actor:not(.is-travelling)[data-position="meeting"] .ch-town-figure{animation:ch-town-idle 5.8s ease-in-out infinite}
html.motion-enabled:not(.motion-paused) .ch-town-lot:nth-of-type(3n) .ch-town-figure{animation-delay:-2s;animation-duration:6.6s}
html.motion-enabled:not(.motion-paused) .ch-town-actor[data-position="dead"] .ch-town-figure{animation:ch-town-ghost 6s ease-in-out infinite}
html.motion-enabled:not(.motion-paused) .ch-town-actor.is-travelling .ch-town-figure{animation:ch-town-step .36s ease-in-out infinite}
html.motion-enabled:not(.motion-paused) .ch-town-actor.is-travelling .ch-town-shadow{animation:ch-town-footfall .36s ease-in-out infinite}
html.motion-enabled:not(.motion-paused) .ch-town-actor.is-travelling :is(.ch-town-sprite--leg-left,.ch-town-sprite--arm-right){animation:ch-town-stride .72s ease-in-out infinite}
html.motion-enabled:not(.motion-paused) .ch-town-actor.is-travelling :is(.ch-town-sprite--leg-right,.ch-town-sprite--arm-left){animation:ch-town-stride .72s ease-in-out -.36s infinite}
html.motion-enabled:not(.motion-paused) .ch-town-haze{animation:ch-town-mist 27s ease-in-out infinite alternate}
html.motion-enabled:not(.motion-paused) .ch-town-haze--far{animation-duration:37s;animation-delay:-11s}
@keyframes ch-town-idle{0%,100%{transform:translateY(0) rotate(-.4deg)}45%{transform:translateY(-1.5px) rotate(.4deg)}}
@keyframes ch-town-ghost{0%,100%{transform:translateY(0);opacity:.26}50%{transform:translateY(-5px);opacity:.36}}
@keyframes ch-town-step{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-2px) rotate(1deg)}}
@keyframes ch-town-stride{0%,100%{transform:rotate(-5deg) translateY(1px)}50%{transform:rotate(5deg) translateY(-1px)}}
@keyframes ch-town-footfall{0%,100%{transform:scaleX(1);opacity:.7}50%{transform:scaleX(.86);opacity:.5}}
@keyframes ch-town-mist{from{transform:translateX(-5%)}to{transform:translateX(8%)}}
@media(max-width:760px){.ch-town-scene{--town-actor-height:clamp(43px,13cqh,70px)}.ch-town-stage .ch-trial-stage{top:17%;width:42%}.ch-town-stage .ch-trial-stage-detail{font-size:7px}.ch-town-stage .ch-town-seat .seat-label{max-width:clamp(42px,11cqw,65px);font-size:7px}.ch-town-caption{font-size:6px;bottom:4px}}
@media(prefers-reduced-motion:reduce){.ch-town-scene *{animation:none!important;transition:none!important}.ch-town-haze{display:none}}
html:not(.motion-enabled) .ch-town-scene *,html.motion-paused .ch-town-scene *{animation:none!important;transition:none!important}
