/* The world map of the Expédition tab (world_map.js): the land drawn in pixels, a hot spot over each présage, its
   preview opening on the map itself. */
.wmap-box { position: relative; margin: 0 -14px; }
.wmap { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 270 / 400; background: #0c0907; border-block: 3px solid #3a2410; box-shadow: 0 4px 0 #1c120a; overflow: hidden; touch-action: manipulation; }
.wmap-canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
@media (min-width: 560px) { .wmap-box { margin-inline: 0; } .wmap { border: 3px solid #3a2410; border-radius: 6px; } }

/* a présage: the touch lands on its shard and its aura */
.wm-spot { position: absolute; width: 48px; height: 58px; transform: translate(-50%, -62%); padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; border-radius: 50%; }
.wm-spot:focus-visible { outline: 2px solid #fbc547; outline-offset: -6px; }

/* a building site: a touch opens its works */
.wm-site { position: absolute; width: 40px; height: 40px; transform: translate(-50%, -60%); padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wm-site:focus-visible { outline: 2px solid #fbc547; outline-offset: -4px; }

/* a companion's party, the Colosse: a touch says who */
.wm-fig { position: absolute; width: 36px; height: 36px; transform: translate(-50%, -70%); padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* the preview, on the map, next to its aura */
.wm-pop { position: absolute; left: clamp(8px, calc(var(--x) - 130px), calc(100% - 268px)); width: 260px; max-width: calc(100% - 16px); z-index: 3;
  display: flex; flex-direction: column; gap: 5px; padding: 8px 10px 10px; border-radius: 6px; background: rgba(24, 17, 13, .96); border: 2px solid #5a4030;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .45), 0 0 0 1px #000; animation: wmPop .18s ease-out; }
.wm-pop.down { top: calc(var(--y) + 14px); }
.wm-pop.up { bottom: calc(100% - var(--y) + 44px); }
.wm-pop.o-funeste { border-color: #8a2032; }
.wm-pop.o-orageux { border-color: #5a3a8a; }
.wm-pop.legend { border-color: #c8902a; }
.wm-pop h3 { margin: 0; font-size: 1rem; }
.wm-pop .wm-whisper { margin: 0; font-size: .88rem; line-height: 1.3; }
.wm-pop .lead-roster { margin: 0; font-size: .8rem; }
.wm-pop .btn.primary { margin-top: 3px; }
.wm-pop-art { margin: -2px -4px 0; border-radius: 4px; overflow: hidden; }
.wm-pop-art canvas { display: block; width: 100%; height: auto; }
@keyframes wmPop { from { opacity: 0; transform: translateY(4px) scale(.98); } }

.wm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.wm-foot .omens-refresh { margin: 0 0 0 auto; }

/* the journey: the whole screen becomes the map while the party walks */
.wm-journey { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: #0c0907; opacity: 0; transition: opacity .3s; }
.wm-journey.on { opacity: 1; }
.wm-journey .wmap { height: min(100dvh, calc(100vw * 400 / 270)); width: auto; max-width: none; border: 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .wm-pop { animation: none; } .wm-journey { transition: none; } }

/* a building site, seen close in its sheet */
.site-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.site-head h2 { margin: 0 0 2px; }
.wm-site-view { width: 108px; height: auto; flex: none; image-rendering: pixelated; border: 3px solid #3a2410; border-radius: 4px; }

/* the names of the places */
.wm-lbl { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; z-index: 1;
  font: .5rem/1 var(--pixel, monospace); color: #e8dcc4; background: rgba(20, 14, 10, .7); border: 1px solid rgba(255, 255, 255, .16); border-radius: 3px; padding: 2px 3px; }
.wm-lbl.big { font-size: .56rem; color: #fff4dc; border-color: rgba(242, 181, 68, .55); }
.wm-lbl.shut { color: #9a92a8; border-color: rgba(255, 255, 255, .1); background: rgba(20, 16, 26, .7); }
.wm-lbl.dark { color: #e8c8ff; border-color: rgba(200, 120, 255, .55); background: rgba(8, 4, 12, .85); }
.wmap.walking .wm-lbl { opacity: .55; }

/* over each présage, a small gem floating: here, you can go. The Légende wears a gold star and its act's ribbon. */
.wm-spot { z-index: 2; --c: #e8dcff; --c2: #9a88d8; }
.wm-spot.k-orageux { --c: #d6b8ff; --c2: #7a4ad8; }
.wm-spot.k-funeste { --c: #ffb0a8; --c2: #c8283a; }
.wm-spot.k-jour { --c: #fff8d0; --c2: #e0b030; }
.wm-mark { position: absolute; left: 50%; top: -2px; width: 12px; height: 16px; margin-left: -6px; pointer-events: none;
  animation: wmFloat 2.4s ease-in-out infinite; filter: drop-shadow(0 0 3px var(--c2)) drop-shadow(0 2px 0 rgba(0, 0, 0, .55)); }
.wm-mark::before, .wm-mark::after { content: ""; position: absolute; clip-path: polygon(50% 0, 100% 38%, 50% 100%, 0 38%); }
.wm-mark::before { inset: 0; background: #1a1018; }
.wm-mark::after { inset: 2px 2px 3px; background: linear-gradient(135deg, #fff 0 22%, var(--c) 22% 48%, var(--c2) 48%); }
.wm-spot.k-legende .wm-mark { width: 22px; height: 22px; margin-left: -11px; top: -12px; filter: drop-shadow(0 0 5px #fbc547) drop-shadow(0 2px 0 rgba(0, 0, 0, .55)); }
.wm-spot.k-legende .wm-mark::before, .wm-spot.k-legende .wm-mark::after { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 71%, 21% 92%, 32% 57%, 2% 35%, 39% 35%); }
.wm-spot.k-legende .wm-mark::after { inset: 3px; background: linear-gradient(160deg, #fff6c8 0 30%, #fbc547 30% 65%, #c87a1a 65%); }
.wm-ribbon { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font: .5rem/1 var(--pixel); color: #2a1408; background: linear-gradient(#ffe08a, #e8a838); border: 1px solid #5a3410; border-radius: 2px; padding: 2px 4px; box-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
.wm-spot.k-jour .wm-ribbon { background: linear-gradient(#fffbe0, #f0d070); }
/* each kind its own sign: gem (calme), lightning (orageux), skull (funeste), sun (défi), star (Légende) */
.wm-spot.k-orageux .wm-mark { width: 13px; height: 18px; margin-left: -6px; top: -4px; }
.wm-spot.k-orageux .wm-mark::before, .wm-spot.k-orageux .wm-mark::after { clip-path: polygon(62% 0, 8% 58%, 44% 58%, 30% 100%, 94% 38%, 56% 38%, 82% 0); }
.wm-spot.k-orageux .wm-mark::after { inset: 2px; background: linear-gradient(160deg, #fff 0 18%, #e2ccff 18% 45%, #8a5ae8 45%); }
/* calme and orageux sit inside their cloud, as big as the skull reads */
.wm-spot.k-calme .wm-mark { width: 17px; height: 22px; margin-left: -8px; top: 12px; filter: drop-shadow(0 0 4px var(--c)) drop-shadow(0 0 2px #fff) drop-shadow(0 2px 0 rgba(0, 0, 0, .6)); }
.wm-spot.k-orageux .wm-mark { width: 18px; height: 24px; margin-left: -9px; top: 10px; filter: drop-shadow(0 0 4px var(--c)) drop-shadow(0 0 2px #fff) drop-shadow(0 2px 0 rgba(0, 0, 0, .6)); }
.wm-spot.k-funeste .wm-mark { width: 16px; height: 16px; margin-left: -8px; top: -3px; }
.wm-spot.k-funeste .wm-mark::before { clip-path: polygon(20% 0, 80% 0, 100% 20%, 100% 62%, 80% 74%, 80% 100%, 20% 100%, 20% 74%, 0 62%, 0 20%); }
.wm-spot.k-funeste .wm-mark::after { inset: 2px; clip-path: polygon(20% 0, 80% 0, 100% 20%, 100% 62%, 80% 74%, 80% 100%, 66% 100%, 66% 86%, 58% 86%, 58% 100%, 42% 100%, 42% 86%, 34% 86%, 34% 100%, 20% 100%, 20% 74%, 0 62%, 0 20%);
  background: radial-gradient(circle at 30% 45%, #1a1018 0 13%, transparent 14%), radial-gradient(circle at 70% 45%, #1a1018 0 13%, transparent 14%), linear-gradient(160deg, #fff 0 20%, #ffc8c0 20% 50%, #d83a3c 50%); }
.wm-spot.k-jour .wm-mark { width: 18px; height: 18px; margin-left: -9px; top: -6px; }
.wm-spot.k-jour .wm-mark::before { clip-path: polygon(50% 0, 60% 22%, 85% 15%, 78% 40%, 100% 50%, 78% 60%, 85% 85%, 60% 78%, 50% 100%, 40% 78%, 15% 85%, 22% 60%, 0 50%, 22% 40%, 15% 15%, 40% 22%); }
.wm-spot.k-jour .wm-mark::after { inset: 4px; clip-path: circle(50%); background: linear-gradient(160deg, #fff 0 30%, #ffe88a 30% 60%, #e0a020 60%); }
.wm-spot.sel .wm-mark { animation-duration: .9s; }
@keyframes wmFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .wm-mark { animation: none; } }

/* the map fills the screen; a drag moves over what does not fit */
.wmap-box { position: relative; }
.wmap-pan { overflow: auto; scrollbar-width: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.wmap-pan::-webkit-scrollbar { display: none; }
.wmap-pan .wmap { max-width: none; margin: 0; border: 0; box-shadow: none; }
.wmap-box { border-block: 3px solid #3a2410; box-shadow: 0 4px 0 #1c120a; background: #0c0907; }

/* the trail and the contract on top of the map, the help and a new reading at the bottom */
.wm-tags { position: absolute; top: 6px; left: 6px; right: 6px; z-index: 3; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.wm-tag { pointer-events: auto; font: .62rem/1.2 var(--pixel); color: #f4e6cf; background: rgba(20, 14, 10, .85); border: 1px solid #5a4030; border-radius: 4px; padding: 4px 6px; cursor: pointer; }
.wm-tag.legend b { color: #fbc547; }
.wm-tag.good { border-color: #6aa84f; }
.wm-empty { position: absolute; left: 10%; right: 10%; top: 45%; z-index: 3; margin: 0; padding: 8px; text-align: center; background: rgba(20, 14, 10, .85); border-radius: 4px; }
.wm-foot { margin-top: 6px; }
.wm-foot .btn { font-size: .66rem; padding: 5px 8px; min-height: 0; }

/* a Borne lit again: its name comes up once the light is full */
.wm-scene-name { position: absolute; z-index: 2; left: 0; right: 0; bottom: 9%; margin: 0; text-align: center; font: 1.1rem var(--pixel); color: #fff4dc;
  text-shadow: 0 0 10px var(--c, #fbc547), 0 2px 0 #000; opacity: 0; transform: translateY(6px); transition: opacity .8s, transform .8s; }
.wm-scene-name.on { opacity: 1; transform: none; }
.wm-scene .wm-lbl { opacity: .45; }
.wm-scene-name { padding: 10px 0; background: linear-gradient(90deg, transparent, rgba(8, 5, 4, .78) 20%, rgba(8, 5, 4, .78) 80%, transparent); }
.wm-scene-name small { display: block; margin-top: 6px; font-size: .78rem; color: #e8dcc4; text-shadow: 0 2px 0 #000; }

/* ---------- a work of the company: its site, its heaps of materials, its plaque and its crew ---------- */
.works-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.works-head h2 { margin: 0 0 2px; }
.works-art { position: relative; flex: none; display: grid; place-items: center; min-width: 96px; min-height: 96px; background: #1c140e; border: 3px solid #3a2410; border-radius: 4px; }
.works-art .wm-site-view { width: 96px; border: 0; }
.works-pct { position: absolute; right: -6px; bottom: -8px; font: .7rem var(--pixel); color: #2a1408; background: linear-gradient(#ffe08a, #e8a838); border: 1px solid #5a3410; border-radius: 3px; padding: 2px 5px; }
.works-heaps { display: flex; flex-direction: column; gap: 8px; }
.works-heap { display: grid; grid-template-columns: 52px 1fr; gap: 4px 10px; align-items: center; padding: 8px; background: #241a14; border: 2px solid #3a2a20; border-radius: 4px; }
.works-heap .qty { grid-column: 1 / -1; }
.works-heap.full { border-color: #4a6a30; opacity: .8; }
.works-what { display: flex; flex-direction: column; gap: 1px; }
.works-what small { font-size: .78rem; }
/* the heap: a crate filling from the ground up */
.works-pile { position: relative; width: 52px; height: 52px; display: grid; place-items: center; background: #15100c; border: 2px solid #5a4030; border-radius: 3px; overflow: hidden; }
.works-pile i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--f) * 100%); background: repeating-linear-gradient(0deg, #8a5a2a 0 6px, #6a4220 6px 8px); }
.works-heap.full .works-pile i { background: repeating-linear-gradient(0deg, #6a9a3a 0 6px, #4a7a2a 6px 8px); }
.works-pile > :not(i) { position: relative; filter: drop-shadow(0 1px 0 #000); }
.works-heap.boss { grid-template-columns: auto 1fr; }
.works-skulls { display: flex; gap: 3px; flex-wrap: wrap; max-width: 120px; }
.works-skulls i { width: 10px; height: 10px; background: #3a2a30; clip-path: polygon(20% 0, 80% 0, 100% 25%, 100% 65%, 75% 80%, 75% 100%, 25% 100%, 25% 80%, 0 65%, 0 25%); }
.works-skulls i.on { background: #e8dcc4; }
.works-plaque { margin: 12px 0 8px; padding: 8px 10px; text-align: center; background: linear-gradient(#3a2a18, #2a1c10); border: 2px solid #c8902a; border-radius: 4px; box-shadow: inset 0 0 0 2px #1a1008; }
.works-plaque small { display: block; font: .6rem var(--pixel); color: #c8a878; text-transform: uppercase; letter-spacing: .06em; }
.works-plaque b { color: #fbe2a0; }
.works-crew { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 10px; }
.works-hand { font-size: .82rem; background: #2a1e16; border: 1px solid #4a3424; border-radius: 3px; padding: 2px 6px; }
.works-hand em { font-style: normal; color: #c8a878; margin-left: 4px; }
.works-hand.first { border-color: #c8902a; }
.works-lock { margin: 6px 0 0; padding: 8px; text-align: center; background: #1c1418; border: 1px dashed #5a4a58; border-radius: 4px; color: #c8bcd0; }
.works-go { width: 100%; margin-top: 4px; }

/* the bastion and La Croisée: a touch goes there */
.wm-place { position: absolute; width: 34px; height: 30px; transform: translate(-50%, -60%); padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wm-place.p-croisee { width: 44px; height: 34px; transform: translate(-50%, -50%); }
.wm-place:focus-visible { outline: 2px solid #fbc547; }
