* { box-sizing: border-box; }
[hidden] { display: none !important; }
.village-layout { min-height: 100vh; display: grid; align-content: center; justify-items: center;
  font: 1rem Georgia, serif; color: #f3e5c7; background: radial-gradient(ellipse at 50% 35%, #344356, #15212e 72%); }
.village-stage { width: min(96vw, 1280px); aspect-ratio: 16 / 9; position: relative; overflow: hidden;
  border-radius: .65rem; background: #1a2836; container-type: inline-size; }
.village-stage button, .village-modal button { font: inherit; cursor: pointer; }
.village-stage button:focus-visible, .village-modal button:focus-visible { outline: 2px solid #fff3c7; outline-offset: 3px; }
.village-backdrop, .village-objects, .village-mini { position: absolute; inset: 0; width: 100%; height: 100%; }
.village-backdrop { object-fit: cover; pointer-events: none; }
.village-objects { touch-action: manipulation; }
.village-target, .village-destination { position: absolute; background: transparent; padding: 0; border: 0; }
.village-target img, .village-destination img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.village-target.passive { pointer-events: none; }
.village-target:not(.passive):hover,
.village-objects:not([inert]) > :is(
  [data-target="exstack-sprite"]:has(~ button[data-target="exstack"]:is(:hover, :focus-visible)),
  [data-target="goki-sprite"]:has(~ button[data-target="goki"]:is(:hover, :focus-visible)),
  [data-target="chasseurs-sprite"]:has(~ button[data-target="hunter-mouton"]:is(:hover, :focus-visible))
) { filter: drop-shadow(0 0 .45rem #f7d58bc7); }
.village-target:focus-visible { border-radius: .4rem; }
.target-caption { display: block; width: fit-content; margin: auto; padding: .15em .42em; border-radius: .3em;
  color: #38281b; background: #eed5ac; font-size: clamp(.63rem, 1.15cqw, .78rem); }
.village-destination { transform: translate(-50%, -50%); border-radius: 40%; }
.village-destination:hover, .village-destination:focus-visible { background: #ffda7c20; box-shadow: inset 0 0 0 2px #f4d189e0, 0 0 .6rem #ffe6a170; }
.village-destination.completed::after { content: ""; position: absolute; right: 12%; top: 14%; width: clamp(7px, 1.2cqw, 13px);
  aspect-ratio: 1; background: #ffe6a0; border: 1px solid #9a652e; border-radius: 50%; box-shadow: 0 0 .55rem #ffe6a0; }
.map-place { position: absolute; left: 85%; width: 10%; top: 67%; min-height: 3%; display: grid; place-items: center;
  pointer-events: none; text-align: center; color: #5a3924; font-weight: 600; font-size: clamp(.44rem, 1.18cqw, .92rem); line-height: 1.05; }
.village-hud { position: absolute; z-index: 4; left: 2%; bottom: 3%; display: flex; flex-wrap: wrap;
  align-items: end; gap: clamp(.22rem, .75cqw, .62rem); font-size: clamp(.65rem, 1.55cqw, 1.02rem); }
.control-gold { padding: .45em .88em; color: #34241a; background: linear-gradient(#f4daa7, #c79358 85%);
  border: 1px solid #edd5a1; border-radius: .45em; font-weight: 600; }
.control-gold:hover { background: #f5ddb1; }
.mini-exit { position: absolute; z-index: 5; top: 2%; right: 2%; min-width: 2.3em; min-height: 2.3em; line-height: 1; }
.mini-hint { display: grid; grid-template-rows: auto auto; justify-items: center; align-items: center;
  padding: 0; color: #372619; background: transparent; border: 0; }
.mini-hint img { width: clamp(29px, 5.4cqw, 67px); aspect-ratio: 1; padding: 8%; object-fit: contain; background: #e9c88d;
  border: 2px solid #b78e58; border-radius: 50%; }
.mini-hint span { padding: .1em .43em; border: 1px solid #ba9561; border-radius: .85em; background: #f8e6bf; }
.mini-hint-text { position: absolute; z-index: 5; max-width: 60%; left: 2%; bottom: clamp(45px, 8.3cqw, 96px);
  padding: .56em .85em; color: #f3e5c7; background: #1b2939ed; border: 1px solid #d5b77a; border-radius: .4rem;
  font-size: clamp(.7rem, 1.55cqw, 1.02rem); pointer-events: none; }
.village-dialogue { position: absolute; z-index: 6; inset: auto 4% 5%; display: grid; align-items: center; gap: .8cqw; }
.village-dialogue.with-portrait { grid-template-columns: minmax(0, 1fr) 24%; }
.village-dialogue.left.with-portrait { grid-template-columns: 24% minmax(0, 1fr); }
.village-dialogue.left .village-portrait { order: -1; }
.village-paper { position: relative; padding: .3em .56em; color: #352417; min-width: 0;
  border-style: solid; border-color: transparent; border-width: clamp(20px, 3.8cqw, 48px) clamp(20px, 4.65cqw, 58px);
  border-image: url("assets/04_interface/bandeau_dialogue/bandeau_dialogue__fond-parchemin__v01-reference.webp") 260 264 224 264 fill stretch;
  filter: drop-shadow(0 3px 6px #101822bb); font-size: clamp(.72rem, 1.78cqw, 1.29rem); line-height: 1.37; }
.village-words { display: block; overflow-wrap: break-word; margin: 0; }
.village-paper .speaker { position: absolute; right: 0; top: clamp(-22px, -1.85cqw, -9px);
  padding: .1em .57em; border: 1px solid #947046; border-radius: .32em; background: #e7cc9d; font-weight: 600; line-height: 1.1; }
.village-dialogue.left .speaker { left: 0; right: auto; }
.village-responses { display: grid; margin-block-start: .5em; gap: .38em; }
.village-response { display: block; width: 100%; min-width: 0; text-align: left; padding: .34em .58em;
  border: 1px solid #90663e; border-radius: .42em; background: #f9ecd4; color: #38281b; line-height: 1.25; }
.village-response:hover { background: #fff3df; }
.village-paper:has(.village-next) { padding-inline-end: 1.25em; cursor: pointer; }
.village-next { position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: #694827; padding: .23em 0; background: transparent; border: 0; }
.village-portrait { display: block; width: 100%; aspect-ratio: 1; padding: 8% 2% 0; overflow: hidden;
  background: #e3c28f; border: 2px solid #bc9a65; border-radius: 42% 42% 24% 24% / 30% 30% 16% 16%; }
.village-portrait img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.village-portrait img.mirror { transform: scaleX(-1); }
.village-modal { width: min(88vw, 620px); max-height: 90vh; padding: clamp(14px, 3vw, 32px); border: 1px solid #ba9561;
  border-radius: .6rem; color: #352417; background: #f1deb6; }
.village-modal::backdrop { background: #1018229e; }
.village-modal header { display: flex; justify-content: space-between; gap: .8rem; align-items: center; margin-bottom: .9rem; }
.village-modal h2 { margin: 0; font-size: clamp(1.05rem, 3vw, 1.5rem); }
.inventory-row { display: flex; align-items: center; gap: .8rem; margin-block: .4rem; }
.inventory-row img { width: min(17vw, 60px); aspect-ratio: 1; object-fit: contain; }
.preparations-list li { margin-block: .55em; }
.preparations-list .done { text-decoration: line-through; color: #705738; }
@media (max-width: 540px) {
  .village-stage:has(.village-dialogue, .mini-hud) { aspect-ratio: auto; padding-block-start: 54vw; }
  .village-stage:has(.village-dialogue, .mini-hud) > .village-backdrop,
  .village-stage:has(.village-dialogue, .mini-hud) > .village-objects { height: 54vw; }
  .village-dialogue { position: relative; inset: auto; margin: -1rem 3% 3%; }
  .village-hud.mini-hud { position: relative; inset: auto; margin: .35rem 2%; }
  .village-target img { max-height: 100%; }
  .map-place { left: 83%; width: 13%; }
}
