/* zcrisis.com /map: the whole page's look, one file (Bastha 2026-11-07: "less patched"). Colours and fonts come from site.css.
   Everything floating lives in the layout of public/map/index.html, placed by shell.js, never by its own coordinates:
     .mp-bar     admin toolbar, a full-width row under the site header (admin view only); the map starts below it
     .mp-hud     the layer over the map: .mp-left (status + side panel) | .mp-center (tool strip, alerts, toast, replay) | .mp-dock
     .mp-dock    the one panel on the right: Zones, Items, Towns, Events, Horde. One at a time.
   A feature's own markup uses the shared words inside .mp-ui: row, chk, hint, warn, st, card, grow, dim, seg, chips. */
:root {
  --panel: var(--win); --house: #e8d36a; --me: #7fc24a; --other: #e0a33a; --rv: #4fa3d1; --off: #8a8173;
  --mp-gap: 12px; --mp-side-w: 290px; --mp-dock-w: 360px; --mp-bar-h: 0px;
  --mp-top: calc(var(--zc-safe-t, 0px) + var(--zc-navh, 62px));
}
body.adminview { --mp-bar-h: 58px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--night); color: var(--text); font: 14px/1.4 var(--body); }
html { overflow: hidden; scrollbar-gutter: auto; }   /* the page never scrolls: no strip kept for a scrollbar */
#map { position: fixed; inset: calc(var(--mp-top) + var(--mp-bar-h)) 0 var(--zc-tabh, 0px) 0; background: #2b2a26; }
.zc-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1100; }
body.adminview #map::after { content: ""; position: absolute; inset: 0; z-index: 900; pointer-events: none; box-shadow: inset 0 0 0 3px rgba(200, 64, 46, .85); }

/* ---- windows: the game's look, one definition */
.mp-win { background: var(--win); border: 1px solid var(--win-line); border-radius: var(--r-win); box-shadow: var(--win-shade), var(--win-shadow); backdrop-filter: blur(6px); }
.muted { color: var(--dim); font-size: 13px; margin: 0; }

/* ---- layer over the map */
.mp-hud { position: fixed; z-index: 1000; inset: calc(var(--mp-top) + var(--mp-bar-h)) 0 var(--zc-tabh, 0px) 0; display: flex; gap: var(--mp-gap); padding: var(--mp-gap); pointer-events: none; }
.mp-left { flex: none; display: flex; flex-direction: column; gap: 8px; width: var(--mp-side-w); min-height: 0; }
.mp-center { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 44px; }   /* toast and replay stay above the map controls */
.mp-fill { flex: 1; }
.mp-hud .mp-win, .mp-hud .mp-toast { pointer-events: auto; }

/* status: the world's state in one place */
.mapstatus { align-self: flex-start; max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 10px 6px 12px; font-size: 13.5px; color: #c9cbc4; }
.mp-status-line { display: flex; align-items: center; min-width: 0; }
.dot { flex: none; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--off); margin-right: 7px; box-shadow: inset 0 -1px 2px rgba(0, 0, 0, .4); }
.dot.on { background: var(--me); animation: zc-ping 2.2s infinite; }
.zc-skyclear { padding: 1px 7px; border: 1px solid var(--win-line); border-radius: 2px; background: none; color: var(--dim); font: 600 12px/1.5 var(--body); cursor: pointer; }
.zc-skyclear:hover { color: var(--text); border-color: var(--amber); }
.zc-skyclear.on { color: var(--amber); border-color: rgba(224, 163, 58, .6); }

/* ---- side panel: one window, tabs on top. Pressing the open tab folds it. */
aside { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.mp-sidetabs { flex: none; display: flex; background: var(--win-title); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13); border-radius: var(--r-win) var(--r-win) 0 0; }
.mp-sidetabs button { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; padding: 3px 4px; border: 0; background: none; color: #cfd1ca;
  font: 700 13px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; text-shadow: 0 1px 0 #000; cursor: pointer; }
.mp-sidetabs button + button { border-left: 1px solid rgba(0, 0, 0, .35); }
.mp-sidetabs button:hover { background: rgba(255, 255, 255, .08); }
aside.open .mp-sidetabs button.on { color: #fff; background: rgba(0, 0, 0, .28); box-shadow: inset 0 -3px 0 var(--amber); }
.mp-sidetabs img { flex: none; width: 24px; height: 24px; object-fit: contain; }
.mp-sidetabs b { min-width: 16px; padding: 1px 4px; border-radius: 8px; background: rgba(0, 0, 0, .45); color: var(--amber); font: 700 11.5px/1.2 var(--body); letter-spacing: 0; }
aside section { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 8px 10px 10px; scrollbar-width: thin; border-top: 1px solid var(--win-line); }
aside:not(.open) section { display: none; }
aside .btn, .leaflet-popup .btn, .zs-win .btn { min-height: 34px; padding: 6px 12px; font-size: 14.5px; }
.plrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 2px; cursor: pointer; }
.plrow:hover { background: var(--sel); }
.plrow .sub { margin-left: auto; color: var(--dim); font-size: 12.5px; }
.sw { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.legend { display: grid; grid-template-columns: 16px 1fr; gap: 7px 10px; align-items: center; color: #c9cbc4; font-size: 13.5px; padding: 2px; }
.legend .sw { justify-self: center; }
.fogsw { width: 16px; height: 11px; background: #1a1a1c; border: 1px solid #555; }
.ms-grip { display: none; }

/* ---- admin toolbar: never moves, never renames. Its options are in the strip below. */
.mp-bar { position: fixed; z-index: 1001; top: var(--mp-top); left: 0; right: 0; height: var(--mp-bar-h); display: flex; justify-content: center; align-items: stretch; gap: 2px; padding: 0 8px;
  background: linear-gradient(#242827, #171a19); border-bottom: 1px solid var(--win-line); box-shadow: 0 2px 8px rgba(0, 0, 0, .45); overflow-x: auto; scrollbar-width: none; user-select: none; }
.mp-bar-h { flex: none; align-self: center; margin-right: 8px; padding: 2px 7px; border: 1px solid rgba(200, 64, 46, .7); border-radius: 2px; color: #ff8a6e; font: 700 12px/1.2 var(--display); letter-spacing: .12em; }
.mp-bar button { flex: none; display: grid; justify-items: center; align-content: center; gap: 1px; min-width: 62px; padding: 3px 6px 2px; border: 0; background: none; color: #d6d8d1;
  font: 600 12.5px/1.15 var(--body); text-shadow: 0 1px 0 #000; cursor: pointer; }
.mp-bar button:hover { background: rgba(255, 255, 255, .09); }
.mp-bar button.on { background: rgba(200, 64, 46, .4); box-shadow: inset 0 -3px 0 var(--pencil-hi); color: #fff; }
.mp-bar button.dim { opacity: .38; cursor: default; }
.mp-bar button img, .mp-bar button svg { width: 30px; height: 30px; object-fit: contain; }
.mp-bar-sep { flex: none; width: 1px; margin: 9px 4px; background: rgba(255, 255, 255, .16); }

/* ---- shared parts of every tool */
.mp-ui { font: 13.5px/1.35 var(--body); color: var(--text); }
.mp-ui input, .mp-ui select, .mp-ui textarea { width: auto; max-width: 100%; min-height: 28px; padding: 3px 6px; background: #0b0d0c; border: 1px solid rgba(255, 255, 255, .22); border-radius: 2px; color: var(--text); font: inherit; box-sizing: border-box; }
.mp-ui input:focus, .mp-ui select:focus, .mp-ui textarea:focus { outline: 1px solid var(--amber); outline-offset: -1px; }
.mp-ui input[type=number] { width: 66px; }
.mp-ui input[type=checkbox] { min-height: 0; width: 15px; height: 15px; margin: 0 7px 0 0; accent-color: var(--pencil); flex: none; }
.mp-ui input[type=color] { width: 30px; min-height: 26px; height: 26px; padding: 1px; flex: none; }
.mp-ui textarea { width: 100%; resize: vertical; }
.mp-ui select option { background: #1a1a1a; }
.mp-ui button { min-height: 28px; padding: 3px 10px; background: linear-gradient(#3b413f, #2a2f2e); border: 1px solid var(--win-line); border-radius: 2px; color: var(--text); font: 600 13px/1.2 var(--body); cursor: pointer; white-space: nowrap; }
.mp-ui button:hover:not(:disabled) { filter: brightness(1.18); }
.mp-ui button:disabled { opacity: .5; cursor: default; }
.mp-ui button.go { background: linear-gradient(var(--pencil-hi), var(--pencil)); border-color: #ff8a6e; color: #fff; }
.mp-ui button.on { background: rgba(200, 64, 46, .45); border-color: #ff8a6e; color: #fff; }
.mp-ui button.sure { background: linear-gradient(#e3b23c, #b98a22); border-color: #f0cf72; color: #1a1408; }
.mp-ui h4 { margin: 12px 0 5px; font: 700 14px/1.1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
.mp-ui h4:first-child { margin-top: 2px; }
.mp-ui p { margin: 0 0 8px; }
.mp-ui .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; margin-top: 6px; }
.mp-ui .row.left { justify-content: flex-start; }
.mp-ui .row label { display: inline-flex; align-items: center; gap: 5px; }
.mp-ui .chk { display: flex; align-items: center; margin-top: 6px; cursor: pointer; }
.mp-ui .lab { display: block; margin: 8px 0 3px; color: var(--dim); font-size: 12.5px; }
.mp-ui .hint, .mp-ui .dim, .mp-ui small { color: var(--dim); font-size: 12.5px; }
.mp-ui .hint { display: block; margin-top: 4px; }
.mp-ui .grow { flex: 1 1 80px; min-width: 0; }
.mp-ui .w { width: 100%; }
.mp-ui .warn { margin: 6px 0; padding: 5px 8px; background: rgba(224, 163, 58, .13); border-left: 3px solid var(--amber); color: #f1d595; font-size: 13px; }
.mp-ui .st { margin-top: 8px; color: var(--ok); font-size: 13px; }
.mp-ui .st.bad, .mp-ui .bad { color: #ff9a8a; }
.mp-ui .ok { color: var(--ok); }
.mp-ui .card { padding: 7px 9px; margin-top: 6px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .13); border-radius: 2px; }
.mp-ui .card.on { border-color: #ff8a6e; background: rgba(200, 64, 46, .12); }
.mp-ui .card.off { opacity: .6; }
.mp-ui .tag { display: inline-block; width: 11px; height: 11px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.mp-ui details { margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 6px; }
.mp-ui summary { cursor: pointer; font-weight: 600; color: #d6d8d1; }
.mp-ui .seg { display: inline-flex; }
.mp-ui .seg button { border-radius: 0; margin-left: -1px; }
.mp-ui .seg button:first-child { margin-left: 0; border-radius: 2px 0 0 2px; }
.mp-ui .seg button:last-child { border-radius: 0 2px 2px 0; }
.mp-ui .chips { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.mp-ui .chips button { min-width: 30px; padding: 2px 7px; }
.mp-ui .tabs { display: flex; gap: 0; margin: 8px 0 8px; border-bottom: 1px solid var(--win-line); }
.mp-ui .tabs button { flex: 1 1 0; min-width: 0; padding: 4px 2px; background: none; border: 0; border-radius: 0; color: var(--dim); }
.mp-ui .tabs button:hover { color: var(--text); filter: none; }
.mp-ui .tabs button.on { background: none; color: #fff; box-shadow: inset 0 -3px 0 var(--pencil-hi); }

/* tool strip: what the picked tool does and its options */
.mp-strip { max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; }
.mp-strip input[type=text] { width: 230px; flex: 1 1 150px; }
.mp-strip label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mp-strip .say { color: #ffd98a; font-size: 13px; }
.mp-strip kbd { padding: 0 5px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 2px; background: rgba(255, 255, 255, .08); font: 600 11.5px/1.5 var(--body); color: var(--dim); }
.mp-alerts { display: grid; gap: 6px; width: min(480px, 100%); }
.mp-alerts:empty { display: none; }
.mp-alert { padding: 7px 10px; border-color: var(--amber); max-height: 40vh; overflow-y: auto; }
.mp-alert .f + .f { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .14); }
.mp-toast { display: flex; align-items: center; gap: 10px; max-width: min(560px, 100%); padding: 6px 12px; background: var(--win-solid); border: 1px solid var(--win-line); border-radius: var(--r-win); box-shadow: var(--win-shadow); color: #c6e8ad; font-size: 13.5px; }
.mp-toast.bad { color: #ff9a8a; }
.mp-bottom { display: flex; justify-content: center; width: 100%; }
.mp-bottom:empty { display: none; }

/* the one panel on the right */
.mp-dock { flex: none; align-self: flex-start; display: flex; flex-direction: column; width: var(--mp-dock-w); max-height: calc(100% - 52px); min-height: 0; background: var(--win-solid); }
.mp-dock .zc-panel-bar { flex: none; padding-right: 4px; }
.mp-dock .zc-panel-title { flex: 1; font-size: 16px; }
.mp-dock-x { flex: none; width: 32px; height: 32px; border: 0; background: none; color: #cfd1ca; font-size: 20px; line-height: 1; cursor: pointer; }
.mp-dock-x:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.mp-dock-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 12px 12px; scrollbar-width: thin; }

/* a tool is in the hand: the map's pins stop taking the mouse, so the click or drag lands on the map */
body[data-armed] .leaflet-marker-pane > *, body[data-armed] .leaflet-overlay-pane .leaflet-interactive { pointer-events: none !important; }
body[data-armed="click"] .leaflet-container, body[data-armed="drag"] .leaflet-container { cursor: crosshair; }
body.mp-space .leaflet-container { cursor: grab !important; }
.mp-ring { position: absolute; z-index: 999; pointer-events: none; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 2px dashed #ff8a6e; border-radius: 50%; display: none; }
.mp-ring.down { border-style: solid; background: rgba(200, 64, 46, .25); box-shadow: 0 0 10px rgba(255, 106, 77, .8); }
@keyframes zcAdmPulse { from { transform: scale(.25); opacity: 1 } to { transform: scale(1.3); opacity: 0 } }

/* ---- zones */
.zc-tp-label { background: rgba(0, 0, 0, .62); border: 0; box-shadow: none; color: #fff; font: 700 12.5px var(--body); padding: 1px 6px; }
.zc-tp-label::before { display: none; }
.mp-zlist { display: grid; gap: 3px; max-height: 190px; overflow-y: auto; margin-top: 8px; scrollbar-width: thin; }
.mp-zrow { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 1px 7px; align-items: center; padding: 4px 7px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 2px; cursor: pointer; }
.mp-zrow:hover { background: var(--sel); }
.mp-zrow.on { border-color: #ff8a6e; background: rgba(200, 64, 46, .14); }
.mp-zrow.off { opacity: .55; }
.mp-zrow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mp-zrow small { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- items and vehicles */
.zc-sp { display: flex; flex-direction: column; gap: 7px; }
.zc-sp-row { display: flex; gap: 6px; }
.mp-ui .zc-sp-row select { flex: 1 1 0; min-width: 0; }
.zc-sp-list { height: clamp(150px, 34vh, 340px); overflow-y: auto; border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .35); scrollbar-width: thin; }
.mp-ui .zc-sp-list button { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 7px; align-items: center; width: 100%; min-height: 0; padding: 2px 6px 2px 3px; border: 0; background: none; border-radius: 0; text-align: left; font-weight: 500; white-space: normal; }
.mp-ui .zc-sp-list button:hover, .mp-ui .zc-sp-list button:focus-visible { background: var(--sel); filter: none; outline: none; }
.mp-ui .zc-sp-list button.on { background: rgba(200, 64, 46, .4); }
.zc-sp img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }
.zc-sp small { display: block; overflow-wrap: anywhere; font-size: 11.5px; }
.zc-sp-empty { margin: 0; padding: 10px; color: var(--dim); }
.zc-sp-sel { display: grid; gap: 3px; max-height: 150px; overflow-y: auto; }
.zc-sp-sel div { display: grid; grid-template-columns: 24px minmax(0, 1fr) 62px 24px; gap: 5px; align-items: center; }
.zc-sp-sel div.one { grid-template-columns: 24px minmax(0, 1fr); }
.zc-sp-sel img { width: 22px; height: 22px; }
.zc-sp-sel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-ui .zc-sp-sel input { width: 62px; }
.mp-ui .zc-sp-sel button { min-height: 22px; padding: 0; background: none; border: 0; font-size: 15px; }
.zc-sp-dest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.mp-ui .zc-sp-dest button { padding: 3px 2px; white-space: normal; font-size: 12.5px; }
.zc-sp-hint { color: #ffd98a; font-size: 13px; }
.zc-sp-log { color: var(--ok); font-size: 13px; }
.zc-sp-log.bad { color: #ff9a8a; }
/* vehicles: each row shows the vehicle's own 3D model (spawnpanel.js), the 3D window floats beside the panel */
.zc-sp-count { margin: 0; padding: 3px 6px; color: var(--dim); font-size: 11.5px; }
.mp-ui .zc-sp-list button.veh { grid-template-columns: 60px minmax(0, 1fr); }
.zc-sp-vp { display: grid; place-items: center; width: 60px; height: 40px; }
.zc-sp .zc-sp-vp img { width: 60px; height: 40px; object-fit: contain; image-rendering: auto; }
.zc-sp-sel div.one.veh { grid-template-columns: 60px minmax(0, 1fr); }
.zc-sp-prev { position: fixed; z-index: 1300; width: 300px; display: grid; gap: 3px; padding: 8px 10px; background: rgba(12, 12, 12, .96);
  border: 1px solid rgba(255, 255, 255, .35); box-shadow: 0 8px 22px rgba(0, 0, 0, .65); color: #e6e6e6; font: 13px/1.3 'Noto Sans', 'Segoe UI', Arial, sans-serif; text-shadow: 0 1px 0 #000; }
.zc-sp-prev[hidden] { display: none; }
.zc-sp-prev small { color: #9a9a9a; font-size: 11px; overflow-wrap: anywhere; }
.zc-sp-stage { position: relative; height: 200px; background: radial-gradient(ellipse at 50% 60%, #2b2f31, #111 75%); touch-action: none; }
.zc-sp-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.zc-sp-wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 10px; text-align: center; color: #9a9a9a; }
.zc-sp-wait img { width: 32px; height: 32px; }
/* admin players (adminplayer.js): picked players (Group tool), the box being drawn, dragging a pin to teleport */
.leaflet-marker-icon.zc-sel { filter: drop-shadow(0 0 0 #5ab4ff) drop-shadow(0 0 5px #5ab4ff) drop-shadow(0 0 2px #5ab4ff); z-index: 900 !important; }
.zc-selbox { position: absolute; z-index: 650; pointer-events: none; border: 1.5px dashed #5ab4ff; background: rgba(90,180,255,.12); border-radius: 2px; }
body.zc-dragging, body.zc-dragging .leaflet-container { cursor: grabbing !important; }
.zc-dragtag { position: absolute; left: 12px; top: -30px; white-space: nowrap; padding: 3px 8px; border-radius: 4px; background: rgba(17,24,32,.92); color: #cfe6ff; border: 1px solid #5ab4ff; font: 600 12.5px/1.4 var(--body); pointer-events: none; }
/* admin Journal (adminlog.js) */
.zc-logbox { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 14px; }
.zc-logbox .zc-log-f { width: 100%; padding: 6px 8px; border: 1px solid var(--win-line); border-radius: 3px; background: rgba(0,0,0,.25); color: inherit; font: inherit; }
.zc-log-note { margin: 0; color: var(--dim); font-size: 12.5px; }
.zc-logbox .bad { margin: 0; color: #e07a6a; }
.zc-log { display: flex; flex-direction: column; }
.zc-log-d { margin: 10px 0 4px; color: #e0a33a; font: 600 11.5px/1.4 var(--body); text-transform: uppercase; letter-spacing: .6px; }
.zc-log-d:first-child { margin-top: 0; }
.zc-log-r { display: grid; grid-template-columns: 42px 1fr; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.zc-log-t { color: var(--dim); font-variant-numeric: tabular-nums; }
/* Chantiers: Atelier plans sent to the game (worldbuild.js) */
.wb-panel { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 14px; }
.wb-what { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.4; }
.wb-show { display: flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.wb-item { display: flex; flex-direction: column; gap: 3px; padding: 7px 9px; border: 1px solid var(--win-line); border-radius: 3px; background: rgba(0,0,0,.18); }
.wb-item.on { background: var(--sel); }
.wb-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; overflow-wrap: anywhere; }
.wb-h span { font: 600 11.5px/1.5 var(--body); white-space: nowrap; }
.wb-g { margin: 0; color: var(--dim); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.wb-msg { color: #e0a33a; }
.wb-b { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.wb-b button { padding: 4px 8px; border: 1px solid var(--win-line); border-radius: 3px; background: rgba(0,0,0,.2); color: inherit; font: 600 12.5px/1.3 var(--body); cursor: pointer; }
.wb-b button:hover { background: var(--sel); }
.wb-b button.go { border-color: #6fd36f; color: #9be89b; }
.wb-b button.warn { border-color: #e07a6a; color: #f0a090; }
.wb-b button:disabled { opacity: .5; cursor: wait; }
.wp-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.wp-tools button { padding: 5px 3px; border: 1px solid var(--win-line); border-radius: 3px; background: rgba(0,0,0,.2); color: var(--dim); font: 600 12px/1.3 var(--body); cursor: pointer; }
.wp-tools button.on { color: var(--text, #e9e4da); border-color: #d58cff; background: rgba(213,140,255,.14); }
.wp-opts { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.wp-opt { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--dim); }
.wp-opt input, .wp-opt select, .wp-pick input, .wp-pick select { padding: 4px 6px; border: 1px solid var(--win-line); border-radius: 3px; background: rgba(0,0,0,.25); color: inherit; font: inherit; }
.wp-opt input[type=number] { width: 64px; }
.wp-name { display: grid; grid-template-columns: 1fr; gap: 3px; }
.wp-pick { display: grid; gap: 4px; }
.wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 3px; max-height: 42vh; overflow-y: auto; padding: 2px; }
.wp-grid button { height: 70px; padding: 0; border: 1px solid var(--win-line); border-radius: 3px; background: rgba(0,0,0,.25); cursor: pointer; overflow: hidden; }
.wp-grid button.on { border-color: #d58cff; box-shadow: 0 0 0 1px #d58cff inset; }
.wp-grid img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
/* admin notes on a player (adminnotes.js) */
.zc-anbox { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 14px; }
.zc-an-form { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--win-line); }
.zc-an-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.zc-an-kind button { padding: 5px; border: 1px solid var(--win-line); border-radius: 3px; background: rgba(0,0,0,.2); color: var(--dim); font: 600 12.5px/1.3 var(--body); cursor: pointer; }
.zc-an-kind button.on { color: var(--text, #e9e4da); border-color: #e0a33a; }
.zc-an-kind button.on.warn { border-color: #c8402e; color: #ec8a76; }
.zc-an-text { width: 100%; resize: vertical; min-height: 60px; padding: 6px 8px; border: 1px solid var(--win-line); border-radius: 3px; background: rgba(0,0,0,.25); color: inherit; font: 13px/1.4 var(--body); }
.zc-an-row { display: flex; align-items: center; gap: 8px; }
.zc-an-err { flex: 1; color: #e07a6a; font-size: 12.5px; }
.zc-an-row button { padding: 5px 14px; border: 1px solid #e0a33a; border-radius: 3px; background: rgba(224,163,58,.15); color: inherit; font: 600 13px var(--body); cursor: pointer; }
.zc-an-dim { margin: 0; color: var(--dim); font-size: 12.5px; }
.zc-an { padding: 7px 9px; border: 1px solid var(--win-line); border-left: 3px solid #8a8173; border-radius: 3px; background: rgba(0,0,0,.18); }
.zc-an.warn { border-left-color: #c8402e; }
.zc-an-h { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12px; }
.zc-an-h span { flex: 1; }
.zc-an-tag { color: #ec8a76; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.zc-an-h button { border: 0; background: none; color: var(--dim); font: 600 13px var(--body); cursor: pointer; padding: 0 2px; }
.zc-an-h button:hover { color: #ec8a76; }
.zc-an-b { margin-top: 3px; font-size: 13px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.mp-ui .zc-sp-link { min-height: 0; padding: 0; background: none; border: 0; color: var(--dim); text-decoration: underline; font-weight: 500; font-size: 12.5px; }

/* ---- Atelier, Construire (roadtool.js, roadview.js, roadpanels.js): canvases over the map tiles, under the markers; rail of tools
   (left), options in the strip, dock (gallery, properties, plan, layers), status line in the bottom slot */
.leaflet-zcRoads-pane { z-index: 390; pointer-events: none; }
.mp-roadcv { position: absolute; left: 0; top: 0; pointer-events: none; }
.mp-roadcut { display: block; width: 100%; height: auto; margin-top: 6px; background: #12170f; border: 1px solid rgba(255, 255, 255, .13); }
body.mp-atelier { --mp-dock-w: 310px; }
@media (max-width: 1300px) { body.mp-atelier { --mp-dock-w: 284px; } }
.mp-rail { align-self: flex-start; display: flex; flex-direction: column; gap: 2px; padding: 5px; background: var(--win-solid); }
.mp-rail button { position: relative; display: grid; place-items: center; width: 42px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: 3px; background: none; color: #d6d8d1; cursor: pointer; }
.mp-rail button svg { width: 24px; height: 24px; }
.mp-rail button .k { position: absolute; right: 2px; bottom: 1px; font: 700 9.5px/1 var(--body); color: var(--dim); }
.mp-rail button:hover { background: rgba(255, 255, 255, .09); color: #fff; filter: none; }
.mp-rail button.on { background: rgba(200, 64, 46, .45); border-color: #ff8a6e; color: #fff; }
.mp-rail button.on .k { color: #ffd2c6; }
.at-rail-sep { height: 1px; margin: 3px 4px; background: rgba(255, 255, 255, .16); }
/* the rail's families: a small title over each group of tools */
.mp-rail { align-items: center; }
.at-fam { align-self: stretch; margin-top: 4px; padding: 5px 0 2px; border-top: 1px solid rgba(255, 255, 255, .14); color: var(--amber); font: 700 8.5px/1 var(--body); letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.at-fam:first-child { margin-top: 0; padding-top: 1px; border-top: 0; }
/* the status line's next gesture: always first, lit */
.at-next { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 2px; background: rgba(255, 225, 75, .14); color: #fff; font-weight: 600; }
.at-next > b { color: var(--amber); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.mp-ui svg.i16 { width: 16px; height: 16px; vertical-align: -3px; }
.at-st-tool { display: inline-flex; align-items: center; gap: 6px; padding-right: 4px; color: #fff; }
.at-st-tool svg { width: 20px; height: 20px; color: var(--amber); }
.at-st-sep { width: 1px; align-self: stretch; margin: 2px 0; background: rgba(255, 255, 255, .14); }
/* the angle snap: its lock lit while on; the free step box beside the step chips */
.mp-ui .at-lock.on { background: rgba(255, 225, 75, .22); border-color: #ffe14b; color: #fff; }
.at-stepv input { width: 46px; padding: 3px 4px; text-align: center; }
.at-stepv.on input { border-color: #ff8a6e; background: rgba(200, 64, 46, .3); color: #fff; }
.mp-ui .at-chip { display: inline-flex; align-items: center; gap: 7px; padding: 2px 8px 2px 2px; text-align: left; }
.at-chip canvas { width: 48px; height: 22px; border-radius: 2px; }
.at-chip span { display: grid; line-height: 1.1; }
.at-chip small { color: var(--dim); font-weight: 500; font-size: 11px; }
.at-sw { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); vertical-align: -1px; }
.at-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; width: min(1100px, 100%); padding: 5px 12px; font-size: 13px; }
.at-status .at-xy { font-variant-numeric: tabular-nums; }
.at-status .at-xy b { color: var(--amber); font-weight: 700; margin-left: 4px; }
.at-status .at-help { margin-left: auto; color: #e6e1d6; }
.at-status .at-help i { color: var(--dim); font-style: normal; }
.at-status kbd, .at-dock kbd { padding: 0 5px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 2px; background: rgba(255, 255, 255, .08); font: 600 11.5px/1.5 var(--body); color: #e8e3d8; }
.at-dock .at-proj { margin-top: 0; }
.at-dock .at-proj select { min-width: 0; }
.at-guide { position: relative; margin-top: 8px; padding: 7px 8px 6px; border: 1px solid rgba(224, 163, 58, .35); border-radius: 3px; background: rgba(224, 163, 58, .07); }
.at-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding-right: 18px; }
.mp-ui .at-steps button { display: grid; justify-items: center; gap: 2px; min-height: 0; padding: 3px 1px; border: 0; background: none; color: var(--dim); font: 600 11.5px/1.1 var(--body); white-space: normal; }
.at-steps button i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; font: 700 11px/1 var(--body); font-style: normal; }
.mp-ui .at-steps button.cur { color: #fff; }
.at-steps button.cur i { border-color: var(--amber); background: var(--amber); color: #1a1408; }
.mp-ui .at-steps button.done { color: var(--ok); }
.at-steps button.done i { background: rgba(139, 208, 106, .2); }
.mp-ui .at-tip { margin: 5px 0 0; font-size: 12.5px; color: #e9dcc0; }
.mp-ui .at-link { min-height: 0; padding: 0 2px; border: 0; background: none; color: var(--amber); text-decoration: underline; font-weight: 600; }
.mp-ui .at-x { position: absolute; top: 2px; right: 2px; min-height: 0; width: 20px; height: 20px; padding: 0; border: 0; background: none; color: var(--dim); font-size: 15px; }
.at-hello { margin-top: 8px; padding: 9px 10px; border: 1px solid rgba(255, 138, 110, .55); border-radius: 3px; background: rgba(200, 64, 46, .12); }
.at-hello ol { margin: 6px 0 4px; padding-left: 20px; font-size: 13px; }
.at-hello li { margin: 3px 0; }
.at-tabs { margin-top: 10px; }
.at-badge { padding: 0 5px; border-radius: 8px; background: var(--amber); color: #1a1408; font-size: 11px; }
.at-tabbody { min-height: 120px; }
.at-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mp-ui .at-card { display: grid; gap: 2px; padding: 4px 4px 6px; text-align: left; white-space: normal; background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .14); }
.mp-ui .at-card.on { border-color: #ff8a6e; background: rgba(200, 64, 46, .2); box-shadow: inset 0 0 0 1px #ff8a6e; }
.at-card canvas { width: 100%; height: auto; aspect-ratio: 320 / 150; border-radius: 2px; }
.at-card b { font-size: 13px; }
.at-card small { font-weight: 500; font-size: 11.5px; color: var(--dim); line-height: 1.25; }
.at-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mp-ui .at-mini button { display: grid; gap: 1px; padding: 2px; white-space: normal; }
.at-mini canvas { width: 100%; height: auto; aspect-ratio: 128 / 60; }
.mp-ui .at-mini small { font-size: 10.5px; line-height: 1.1; color: inherit; }
.at-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.at-stretch { display: grid; gap: 3px; margin-top: 5px; padding: 5px 7px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 2px; }
.at-stretch .at-parts { font-size: 12.5px; }
.mp-ui .at-empty { margin-top: 8px; }
.mp-ui .at-code { font: 11.5px/1.3 monospace; }
.at-layers { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--win-line); }
.at-layer { display: flex; align-items: center; gap: 5px; margin-top: 3px; padding: 3px 4px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 2px; cursor: pointer; }
.at-layer.on { border-color: #ff8a6e; background: rgba(200, 64, 46, .14); }
.at-layer.off .at-lname { opacity: .45; text-decoration: line-through; }
.mp-ui .at-layer button { min-height: 24px; width: 26px; padding: 0; display: grid; place-items: center; background: none; border-color: transparent; color: #d6d8d1; }
.mp-ui .at-layer button:hover { background: rgba(255, 255, 255, .1); filter: none; }
.mp-ui .at-layer button.lk { color: var(--amber); }
.at-lname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.at-kind { white-space: nowrap; }
.at-lmore { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 2px 0 4px 8px; padding: 5px 7px; border-left: 2px solid rgba(255, 138, 110, .5); }
.mp-ui .at-lmore input[type=range] { width: 90px; padding: 0; min-height: 0; border: 0; background: none; accent-color: var(--pencil); }
.at-ladd { margin-top: 6px; }
.at-prev { position: fixed; z-index: 1300; pointer-events: none; width: 440px; display: grid; gap: 3px; padding: 8px; background: rgba(12, 14, 13, .97); border-color: rgba(255, 255, 255, .35); }
.at-prev canvas { width: 100%; height: auto; aspect-ratio: 880 / 560; border-radius: 2px; }
.at-prev b { font: 700 15px/1.2 var(--display); letter-spacing: .03em; }
.at-prev small { font-size: 12.5px; color: #d2cec4; }
/* levels (z) and the basement workspace (roadunder.js) */
.at-status .at-levels { display: inline-flex; align-items: center; gap: 2px; }
.mp-ui .at-levels button { min-height: 0; min-width: 28px; padding: 1px 5px; font: 600 12px/1.4 var(--body); }
.mp-ui .at-levels button.ug { color: #9cd0ff; }
.mp-ui .at-levels button.on { background: #ffe14b; border-color: #ffe14b; color: #111; }
.at-levels .dim { margin: 0 4px; }
.at-st-lev { display: inline-flex; align-items: center; gap: 4px; color: #9cd0ff; }
.at-soon { margin-left: 3px; padding: 0 4px; border-radius: 2px; background: rgba(255, 209, 102, .18); color: #ffd166; font: 600 10.5px/1.5 var(--body); font-style: normal; white-space: nowrap; }
.mp-ui .at-card { position: relative; }
.at-badge-soon { position: absolute; top: 8px; right: 8px; }
.mp-ui .at-card.soon { opacity: 1; cursor: not-allowed; }
.at-card.soon canvas { filter: grayscale(.55) brightness(.8); }
.at-card.soon b, .at-card.soon small { opacity: .7; }
.at-tpl { position: relative; display: grid; gap: 2px; padding: 4px 4px 6px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 3px; background: rgba(255, 255, 255, .03); cursor: grab; user-select: none; touch-action: none; }
.at-tpl:hover { border-color: #ff8a6e; }
.at-tpl.off { opacity: .45; }
.at-tray { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.at-tray h4 { margin: 0 0 6px; }
.at-tray h4 small { font: 400 11.5px/1 inherit; color: var(--dim); text-transform: none; letter-spacing: 0; margin-left: 6px; }
.at-tray-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.at-tpl-s { flex: 0 0 104px; }
.at-tpl-s b { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-tpl img, .at-tpl-nopic { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 2px; background: #1a2416; pointer-events: none; }
.at-tpl b { font-size: 13px; padding-right: 18px; }
.at-tpl small { font-size: 11.5px; color: var(--dim); }
.at-tplghost { position: fixed; z-index: 1400; pointer-events: none; width: 170px; display: grid; gap: 3px; padding: 4px; opacity: .92; }
.at-tplghost img { width: 100%; border-radius: 2px; }
body.at-tpldrag, body.at-tpldrag * { cursor: grabbing !important; }
.at-ulist { display: grid; gap: 4px; }
.mp-ui .at-ulist button { display: flex; gap: 8px; align-items: flex-start; text-align: left; white-space: normal; min-height: 0; padding: 5px 7px; }
.at-ulist svg { flex: 0 0 22px; width: 22px; height: 22px; }
.at-ulist small { display: block; font-weight: 500; font-size: 11.5px; color: var(--dim); }
.mp-ui .at-ulist button.on { border-color: #ff8a6e; background: rgba(200, 64, 46, .2); }
.at-bends { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.at-lev { display: inline-flex; align-items: center; gap: 3px; }
.mp-stage { flex: 1 1 0; min-height: 0; width: 100%; padding: 0; background: #0b0f0c; overflow: hidden; }
.mp-stage[hidden] { display: none; }
.mp-center:has(> .mp-stage:not([hidden])) > .mp-fill { display: none; }
.ug { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: minmax(0, 5fr) minmax(0, 3fr) auto; gap: 4px; width: 100%; height: 100%; padding: 4px; }
.ug-v { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid rgba(255, 255, 255, .14); background: #0d1210; }
.ug-v header { flex: 0 0 30px; height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 8px; overflow: hidden; white-space: nowrap; font-size: 13px; }
.mp-ui .ug-v header button { min-height: 0; padding: 1px 7px; }
.ug-v header label { display: inline-flex; align-items: center; gap: 4px; }
.ug-v canvas { display: block; flex: 1 1 0; min-height: 0; width: 100%; touch-action: none; }
.ug-plan { grid-column: 1; grid-row: 1; } .ug-cutb { grid-column: 2; grid-row: 1; } .ug-cuta { grid-column: 1; grid-row: 2; } .ug-iso { grid-column: 2; grid-row: 2; }
.ug-note { grid-column: 1 / -1; margin: 0; padding: 0 4px 2px; font-size: 12px; color: #ffd98a; }
/* ---- Atelier, guided mode (roadguide.js): intention cards, the thread of steps, one step's choices, Retour / Suivant */
.gd { display: grid; gap: 10px; }
.gd h3 { margin: 0; font-size: 17px; color: #fff; }
.gd h3 em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; margin-left: 6px; }
.gd-what { margin: 2px 0 0; color: #d6d3c9; font-size: 13.5px; line-height: 1.45; }
.gd-intents { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mp-ui .gd-intent { display: grid; gap: 3px; padding: 5px 5px 8px; text-align: left; white-space: normal; background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .16); }
.mp-ui .gd-intent:hover { border-color: var(--amber); background: rgba(224, 163, 58, .12); }
.gd-intent canvas { width: 100%; height: auto; aspect-ratio: 320 / 170; border-radius: 2px; }
.gd-intent b { font-size: 15px; color: #fff; }
.gd-intent small, .gd-card small, .gd-resume small { color: var(--dim); font-size: 12px; font-weight: 500; line-height: 1.35; }
.mp-ui .gd-resume { display: grid; gap: 2px; text-align: left; white-space: normal; border-color: var(--amber); background: rgba(224, 163, 58, .12); padding: 7px 10px; }
.gd-flow { display: flex; align-items: center; gap: 8px; }
.gd-flow b { font-size: 14px; color: var(--amber); } .gd-flow small { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-ui .gd-homebtn { min-height: 0; padding: 1px 8px; font-size: 15px; }
.gd-thread { display: flex; flex-wrap: wrap; gap: 3px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.gd-thread li { flex: 1 1 0; min-width: 0; }
.mp-ui .gd-thread button { display: grid; justify-items: center; gap: 1px; width: 100%; min-height: 0; padding: 4px 1px 3px; font-size: 10.5px; white-space: nowrap; background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .12); color: #bdbab0; }
.gd-thread i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-weight: 700; font-size: 11.5px; background: rgba(255, 255, 255, .1); color: #fff; }
.gd-thread span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mp-ui .gd-thread button.gd-skipped { color: #8e8b82; } .mp-ui .gd-thread button.done { color: #cfe9c4; } .gd-thread button.done i { background: #3f7a2c; }
.mp-ui .gd-thread button.cur { border-color: var(--amber); background: rgba(224, 163, 58, .16); color: #fff; } .gd-thread button.cur i { background: var(--amber); color: #111; }
.gd-step { display: grid; gap: 8px; padding: 10px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .025); }
.gd-body { display: grid; gap: 8px; }
.gd-lab { font-size: 11.5px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.gd-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mp-ui .gd-chip { min-height: 0; padding: 4px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.gd-chip small { color: var(--dim); font-size: 11px; }
.mp-ui .gd-chip.on { border-color: var(--amber); background: rgba(224, 163, 58, .22); color: #fff; }
.gd-plans { display: grid; grid-template-columns: 1fr; gap: 6px; }
.mp-ui .gd-plans .gd-card { grid-template-columns: 52% 1fr; align-items: start; column-gap: 8px; }
.gd-plans .gd-card canvas { grid-row: 1 / span 2; }
.mp-ui .gd-card { display: grid; gap: 3px; padding: 5px 5px 7px; text-align: left; white-space: normal; background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .16); }
.mp-ui .gd-card:hover { border-color: var(--amber); }
.mp-ui .gd-card.on { border-color: #7be04b; background: rgba(123, 224, 75, .1); box-shadow: inset 0 0 0 1px #7be04b; }
.gd-card canvas { width: 100%; height: auto; border-radius: 2px; }
.gd-card b { font-size: 14px; color: #fff; }
.mp-ui .gd-more { justify-self: start; }
.mp-ui button.wide { width: 100%; }
.gd-do { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: #d6d3c9; } .gd-do b { color: #fff; }
.gd-hint { margin: 0; font-size: 12.5px; color: #c9c6bb; } .gd-hint.dim { color: var(--dim); }
.gd-count { margin: 0; font-size: 12.5px; color: var(--dim); }
.gd-done, .gd-ok { margin: 0; color: #9fe07f; font-weight: 600; } .gd-ok { font-size: 15px; }
.gd-warn { margin: 0; color: #ffb38a; } .gd-info { margin: 0; color: #b9e08f; } .gd-wait { margin: 0; color: var(--dim); }
.gd-ab { display: grid; gap: 6px; padding: 8px; border: 1px dashed rgba(255, 225, 75, .5); }
.mp-ui .gd-ab > button { justify-self: start; }
.gd-pbs { display: grid; gap: 6px; }
.gd-pb { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-left: 3px solid #ff5a3c; background: rgba(255, 90, 60, .08); }
.gd-pb.on { background: rgba(255, 90, 60, .2); }
.mp-ui .gd-pbmsg { flex: 1 1 100%; display: flex; gap: 8px; align-items: flex-start; text-align: left; white-space: normal; min-height: 0; padding: 3px 4px; background: none; border: 0; font-weight: 500; }
.gd-pbmsg i { flex: 0 0 auto; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #ff5a3c; color: #111; font-style: normal; font-weight: 700; font-size: 11px; }
.mp-ui .gd-fix { min-height: 0; padding: 3px 9px; font-size: 12.5px; border-color: #7be04b; color: #cfe9c4; }
.gd-send { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-rooms { display: grid; gap: 4px; }
.gd-rooms label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #c9c6bb; }
.gd-rooms i { width: 10px; height: 10px; border-radius: 2px; } .gd-rooms select { margin-left: auto; }
.gd-bottom { position: sticky; bottom: -12px; z-index: 2; display: grid; gap: 6px; margin: 0 -12px -12px; padding: 8px 12px 12px; background: var(--win-solid, #161a18); border-top: 1px solid rgba(255, 255, 255, .12); }
.gd-nav { display: flex; justify-content: space-between; gap: 8px; }
.mp-ui .gd-nav button { min-width: 110px; padding: 6px 14px; font-size: 14px; }
.gd-foot { display: flex; align-items: center; gap: 6px; }
.gd-foot .grow { flex: 1; }
.mp-ui .gd-foot button { min-height: 0; padding: 3px 9px; font-size: 12.5px; }
.gd-expert { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--dim); cursor: pointer; }
.at-status.gd-status { gap: 6px 14px; font-size: 14px; width: auto; background: var(--win-solid); backdrop-filter: none; }
.gd-status .at-next { font-size: 14px; }
.gd-sundo { display: inline-flex; gap: 4px; margin-left: auto; }
.mp-ui .gd-sundo button { min-height: 0; padding: 2px 9px; font-size: 12.5px; }
.at-gmenu { position: fixed; z-index: 4500; display: grid; gap: 3px; min-width: 190px; max-width: 280px; padding: 7px; }
.at-gmenu > b { font-size: 12.5px; color: var(--amber); padding: 0 3px 3px; line-height: 1.3; }
.mp-ui.at-gmenu button { display: grid; gap: 1px; text-align: left; white-space: normal; min-height: 0; padding: 5px 9px; font-size: 13.5px; }
.at-gmenu button small { color: var(--dim); font-size: 11.5px; font-weight: 500; }
.mp-ui.at-gmenu button.on { border-color: var(--amber); background: rgba(224, 163, 58, .18); }
.at-gmenu > p { margin: 0 3px 4px; font-size: 12px; color: var(--dim); line-height: 1.35; }
.mp-ui.at-gmenu button.off { opacity: .55; cursor: not-allowed; border-style: dashed; }
.mp-ui.at-gmenu button.off small { color: #ffb38a; }
/* the guided mode after the blind test: Mes plans, the bridge card, the chips' legend, the quarters, the discreet skip */
.gd-mine { display: grid; gap: 4px; margin-bottom: 8px; }
.mp-ui .gd-mine button { display: grid; gap: 1px; text-align: left; white-space: normal; padding: 5px 9px; background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .16); }
.mp-ui .gd-mine button:hover { border-color: var(--amber); }
.mp-ui .gd-mine button.on { border-color: var(--amber); background: rgba(224, 163, 58, .12); }
.gd-mine b { font-size: 13.5px; color: #fff; } .gd-mine small { color: var(--dim); font-size: 12px; font-weight: 500; }
.gd-adds { display: grid; gap: 6px; margin-bottom: 8px; }
.mp-ui .gd-card.gd-add { grid-template-columns: 42% 1fr; align-items: center; column-gap: 9px; border-color: rgba(90, 180, 255, .6); background: rgba(90, 180, 255, .08); }
.mp-ui .gd-card.gd-add:hover, .mp-ui .gd-card.gd-add.on { border-color: #5ab4ff; background: rgba(90, 180, 255, .18); box-shadow: inset 0 0 0 1px #5ab4ff; }
.gd-card.gd-add canvas { grid-row: 1 / span 2; }
/* « Ajouter un pont »: what it crosses, said first */
.gd-over { display: grid; gap: 4px; }
.mp-ui .gd-over button { display: grid; gap: 1px; text-align: left; white-space: normal; padding: 6px 10px; border-color: rgba(90, 180, 255, .45); background: rgba(90, 180, 255, .06); }
.mp-ui .gd-over button:hover, .mp-ui .gd-over button.on { border-color: #5ab4ff; background: rgba(90, 180, 255, .2); }
.gd-over b { font-size: 13.5px; color: #fff; } .gd-over small { color: var(--dim); font-size: 12px; font-weight: 500; }
.gd-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0; font-size: 12px; color: #c9c6bb; }
.gd-legend span { display: inline-flex; align-items: center; gap: 5px; }
.gd-legend i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #101511; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.gd-zones { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.gd-zones li { display: flex; align-items: center; gap: 6px; } .gd-zones small { color: var(--dim); }
.mp-ui .gd-nav button.gd-skip { background: transparent; border-color: rgba(255, 255, 255, .2); color: #c9c6bb; font-size: 13px; }
body.gd-hand .leaflet-container { cursor: pointer; }
body.gd-cross .leaflet-container { cursor: crosshair; }
.zc-tip.at-railtip { transform: none; }
@media (max-width: 760px) { .mp-rail { flex-direction: row; overflow-x: auto; max-width: 100%; } .at-rail-sep { width: 1px; height: auto; margin: 4px 2px; } .at-fam { display: none; } .at-status .at-help { display: none; } }

/* ---- right-click: a message around a spot */
.mp-ask { display: grid; gap: 7px; }
.mp-ask b { font-weight: 600; }

/* ---- replay */
.mp-replay { display: flex; align-items: center; gap: 8px; width: min(720px, 100%); padding: 6px 10px; }
.mp-replay input[type=range] { flex: 1; min-width: 60px; padding: 0; min-height: 0; border: 0; background: none; accent-color: var(--pencil); }
.mp-replay .time { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--dim); }

/* ---- Leaflet: every map control looks the same */
.leaflet-container { background: #2b2a26; font: inherit; }
.leaflet-bar { border: 1px solid var(--win-line) !important; border-radius: var(--r-win) !important; box-shadow: var(--win-shadow) !important; overflow: hidden; }
.leaflet-bar a, .leaflet-control-zoom a { background: linear-gradient(#3b413f, #2a2f2e) !important; color: var(--text) !important; border-color: var(--win-line) !important; }
.leaflet-bar a:hover { filter: brightness(1.15); }
.mp-ctl { display: flex; flex-direction: row; }
.mp-ctl a { display: flex !important; align-items: center; gap: 5px; width: auto !important; height: 32px !important; padding: 0 10px; font: 600 13px/1 var(--body); text-decoration: none; white-space: nowrap; border: 0 !important; border-radius: 0 !important; }
.mp-ctl a img { width: 22px; height: 22px; object-fit: contain; }
.mp-ctl a.on { background: rgba(0, 0, 0, .55) !important; color: var(--amber) !important; box-shadow: inset 0 -2px 0 var(--amber); }
.zc-ghostsw-t { display: flex; align-items: center; padding: 0 8px 0 10px; font: 600 12px/1 var(--body); color: var(--dim, #8a8fa3); white-space: nowrap; }   /* Chantiers ghosts: Couleurs / Bleus / Cachés */
.zc-floors a { justify-content: center; min-width: 32px; padding: 0 7px; }
.zc-floors a.n { color: var(--amber) !important; }
.leaflet-tooltip { background: rgba(8, 9, 9, .95); color: #e4e4e4; border: 1px solid rgba(255, 255, 255, .3); border-radius: 2px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .5); font: 13.5px/1.35 var(--body); text-shadow: 0 1px 0 #000; }
.leaflet-tooltip-top::before { border-top-color: rgba(255, 255, 255, .3); }
/* the map controls: one row in the bottom corner, left of the chat button (site.js). They never move: a panel stops above them. */
.leaflet-bottom.leaflet-right { right: 112px; bottom: 16px; display: flex; align-items: flex-end; gap: 6px; }
.leaflet-bottom.leaflet-right .leaflet-control { margin: 0; float: none; }
.leaflet-bottom.leaflet-right .leaflet-control-zoom { display: flex; }
.leaflet-bottom.leaflet-right .leaflet-control-zoom a { width: 32px; height: 32px; line-height: 32px; border-bottom: 0; }

/* ---- gate (logged out / not linked): a game window in the middle of the map */
.overlay { position: fixed; inset: 0; z-index: 1002; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.overlay .mp-win { pointer-events: auto; width: min(420px, 100%); padding: 0; text-align: center; background: var(--win-solid); }
.overlay .mp-win > :not(.zc-panel-bar) { margin-left: 22px; margin-right: 22px; }
.overlay .mp-win > :last-child { margin-bottom: 22px; }
.overlay .zc-panel-bar { margin-bottom: 18px; text-align: left; }
.overlay h2 { font: 700 26px/1.1 var(--display); letter-spacing: .02em; margin: 0 0 8px; }
.overlay p { color: #c9cbc4; margin: 0 0 14px; font-size: 15px; }
.overlay p.muted { color: var(--dim); font-size: 13.5px; }
.overlay .zc-cluster { justify-content: center; margin-bottom: 14px; }
.code { font: 700 34px/1 var(--display); letter-spacing: .25em; padding: 14px 10px 14px 18px; border: 1px dashed var(--pencil); border-radius: 2px; background: #0b0d0c; color: #fff; user-select: all; }

/* ---- what is on the map: players, safehouses, RVs, cars, markers */
.pin { position: relative; }
.pin i { display: block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #111; box-shadow: 0 0 0 2px rgba(255,255,255,.8); }
.pin span { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); white-space: nowrap; font: 600 12.5px var(--body); color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 2px #000; }
.pin.rv i { border-radius: 3px; width: 18px; height: 14px; }
.pin.house i { border-radius: 3px; transform: rotate(45deg); width: 13px; height: 13px; }
.pin.off i { opacity: .7; }
.pin.car i { width: 26px; height: 18px; border-radius: 5px; display: grid; place-items: center; color: #111; }
.pin.car i svg { width: 20px; height: 13px; }
.vpin { width: 26px; height: 18px; border-radius: 5px; display: grid; place-items: center; background: #2a3a46; color: #9fd0f0; border: 2px solid #111; box-shadow: 0 0 0 1.5px rgba(159,208,240,.55); cursor: pointer; }
.vpin.own { background: #24402a; color: #a9e07c; box-shadow: 0 0 0 1.5px rgba(127,194,74,.6); }
.vpin svg { width: 18px; height: 12px; }
.vfig { position: relative; width: 56px; height: 42px; cursor: pointer; }
.vfig img { position: relative; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.vfig::before { content: ""; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(159,208,240,.45), rgba(159,208,240,0)); }
.vfig.own::before { background: radial-gradient(closest-side, rgba(127,194,74,.55), rgba(127,194,74,0)); }
.vfig:hover img { filter: drop-shadow(0 0 3px #e0a33a) drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.vc-pic { flex: none; width: 64px; height: 48px; display: grid; place-items: center; border-radius: 6px; background: #2a2d2e; border: 1px solid #3b3f40; color: #9fd0f0; overflow: hidden; }
.vc-pic img { width: 64px; height: 48px; } .vc-pic svg { width: 30px; height: 18px; }
.vc-plate { display: inline-block; padding: 0 5px; border-radius: 3px; background: #f1efe6; color: #1d3f8a; font-weight: 700; font-size: 11.5px; letter-spacing: .06em; }
.vsw { display: inline-grid; place-items: center; width: 20px; height: 13px; margin-right: 6px; vertical-align: -2px; color: #9fd0f0; }
.vsw svg { width: 18px; height: 12px; }
/* shared markers (markers.js): a 32 px item icon in a round inventory slot; markers.css loads after this file */
.leaflet-marker-icon .zm-pin.zm-ico { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 2px solid #8a8173; background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .1), transparent 70%), #0c0f0e; box-shadow: 0 2px 6px rgba(0, 0, 0, .7); }
.leaflet-marker-icon .zm-pin.zm-ico.zm-mine { border-color: var(--me); }
.leaflet-marker-icon .zm-pin.zm-ico.zm-horde, .leaflet-marker-icon .zm-pin.zm-ico.zm-danger { border-color: var(--pencil); }
.leaflet-marker-icon .zm-pin.zm-ico.zm-at { width: 46px; height: 46px; border-color: var(--rv); box-shadow: 0 0 0 4px rgba(79,163,209,.35), 0 2px 6px rgba(0,0,0,.7); }
.zm-pin .zc-ico, .zm-kind .zc-ico, .zm-head .zc-ico { pointer-events: none; }
.zm-popup .zm-head { display: flex; align-items: center; gap: 8px; }
.zm-popup .zm-kind { font-size: 0; padding: 4px 2px 5px; }
.zm-popup .zm-kind span { font-size: 11px; }
.zm-popup .leaflet-popup-content-wrapper { background: var(--win-solid); border-color: var(--win-line); border-radius: var(--r-win); box-shadow: var(--win-shadow); }
.zm-popup .leaflet-popup-content { font-family: var(--body); }
.zm-popup .zm-kind, .zm-popup .zm-input { background: #0b0d0c; border-color: rgba(255, 255, 255, .18); border-radius: 2px; }
.zm-popup .zm-kind:hover { background: #161a19; }
.zm-popup .zm-kind.on { border-color: var(--amber); background: rgba(224, 163, 58, .12); }
dialog { background: var(--win-solid); color: var(--text); border: 1px solid var(--win-line); border-radius: var(--r-win); width: min(520px, calc(100vw - 32px)); padding: 18px; box-shadow: var(--win-shadow); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { font: 700 20px var(--display); margin: 0 0 10px; letter-spacing: .04em; }
dialog table { width: 100%; border-collapse: collapse; }
dialog td { padding: 6px 4px; border-top: 1px solid var(--win-line-soft); }
dialog td img { width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }

/* ---- narrower windows */
@media (max-width: 1000px) { .mp-left { margin-bottom: 44px; } }   /* the row of controls reaches this far left */
@media (max-width: 1180px) { :root { --mp-dock-w: 330px; --mp-side-w: 260px; } .mp-bar { justify-content: flex-start; } .mp-bar button { min-width: 56px; padding: 3px 4px 2px; } .mp-sidetabs button { gap: 3px; padding: 3px 2px; font-size: 12px; } .mp-sidetabs img { width: 20px; height: 20px; } }
/* ---- phones (app shell, site.css): the side panel and the dock are sheets over the map */
@media (max-width: 760px) {
  :root { --mp-gap: 8px; }
  body.adminview { --mp-bar-h: 54px; }
  .mp-hud { flex-direction: column; }
  .mp-left { width: auto; align-self: flex-start; }
  .mp-center { width: 100%; padding-bottom: 76px; }
  .mapstatus { padding: 5px 10px; font-size: 13px; }
  .zc-skyclear { display: none; }
  .mp-bar button { min-width: 54px; font-size: 11.5px; }
  .mp-bar button img, .mp-bar button svg { width: 26px; height: 26px; }
  aside { position: fixed; left: 0; right: 0; bottom: var(--zc-tabh); width: auto; max-height: 64px; border-radius: 12px 12px 0 0; border-bottom: 0; transition: max-height .25s cubic-bezier(.2, .8, .2, 1); }
  aside.open { max-height: min(62dvh, calc(100dvh - var(--zc-safe-t) - var(--zc-navh) - var(--zc-tabh) - 60px)); }
  aside section { overscroll-behavior: contain; }
  .mp-sidetabs { border-radius: 0; }
  .ms-grip { flex: none; display: grid; place-items: center; width: 100%; height: 22px; padding: 0; border: 0; background: var(--win-solid); border-radius: 12px 12px 0 0; cursor: pointer; touch-action: none; }
  .ms-grip i { width: 42px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
  /* more map on a phone (Bobsta 2026-11-13): folded, the sheet is only its tabs (a tab opens it, the grip comes back to close);
     the admin toolbar is icons only (the label stays as the button's tooltip / accessible name) */
  aside:not(.open) { max-height: 44px; }
  aside:not(.open) .ms-grip { display: none; }
  body.adminview { --mp-bar-h: 42px; }
  .mp-bar button { min-width: 44px; font-size: 0; gap: 0; }
  .mp-bar button img, .mp-bar button svg { width: 24px; height: 24px; }
  .mp-dock { position: fixed; left: 6px; right: 6px; bottom: calc(var(--zc-tabh) + 70px); width: auto; max-height: 56dvh; }
  .mp-left { margin-bottom: 0; }
  /* no room for a row: a column on the right, above the sheet and the chat button */
  .leaflet-bottom.leaflet-right { right: 10px; bottom: 120px; flex-direction: column; }
  .zc-floors { flex-direction: column; }
  .zc-chat.float { --zc-chat-b: 74px; }
  body:has(aside.open) .zc-chat.float:not(.open) { display: none; }
  .mp-strip input[type=text] { width: 100%; flex-basis: 100%; }
}
.gd-fin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: #2c3a22; border: 1px solid #6f9a4a; }
.gd-fin-bar b { flex: 1 1 100%; color: #cfe9b4; }
.gd-fin { font-style: normal; color: #9fe07f; }
.mp-ui .gd-side { display: flex; flex-direction: column; align-items: center; gap: 2px; background: transparent; border: 1px solid rgba(255, 255, 255, .28); color: #e8e5dc; }
.mp-ui .gd-side small { font-size: 11.5px; color: #b3b0a6; font-weight: 500; }

/* ---- Quests journal (Bobsta 2026-11-09, his mock-up "Interface Quêtes"): while the Quests panel is in the dock, the dock is a
   leather notebook: paper title strip, red folder tabs, olive sections, a paper side column (templates / summary), big red button.
   Everything is scoped to .zcq or to the dock holding it, so the other tools keep the game window look. */
.mp-dock:has(.zcq) { --zq-olive: linear-gradient(#55603a, #3b4428); --zq-olive-line: #6d7a49; --zq-red: linear-gradient(#c9533c, #9a2f20);
  width: min(660px, calc(100vw - var(--mp-side-w) - 3 * var(--mp-gap)));
  background: radial-gradient(120% 70% at 20% 0%, #2c2620, transparent 60%), radial-gradient(90% 60% at 100% 100%, #241e19, transparent 70%), #1a1714;
  border: 2px solid #3d3228; border-radius: 6px; outline: 1px dashed rgba(200, 170, 120, .28); outline-offset: -7px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .7), 0 18px 40px rgba(0, 0, 0, .6); }
.mp-dock:has(.zcq) .zc-panel-bar { position: relative; margin: 10px 12px 0; min-height: 52px; padding: 4px 6px 4px 10px; background: var(--paper-grain), linear-gradient(#ece2c8, #d8cba8);
  color: var(--paper-ink); clip-path: polygon(0 6%, 3% 0, 40% 4%, 70% 0, 100% 5%, 99% 92%, 70% 100%, 35% 95%, 2% 100%); box-shadow: none; border: 0; }
.mp-dock:has(.zcq) .zc-panel-bar::after { content: ""; position: absolute; right: 52px; top: 0; width: 120px; height: 100%; pointer-events: none;
  background: radial-gradient(circle at 30% 40%, rgba(150, 20, 10, .55) 0 7px, transparent 8px), radial-gradient(circle at 48% 62%, rgba(150, 20, 10, .4) 0 3px, transparent 4px),
    radial-gradient(circle at 62% 30%, rgba(150, 20, 10, .35) 0 2px, transparent 3px), radial-gradient(ellipse at 40% 50%, rgba(120, 15, 5, .18), transparent 60%); }
.mp-dock:has(.zcq) .zc-panel-title { color: #1b1a16; font: 900 30px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; text-shadow: none;
  text-decoration: underline 3px #b8402c; text-underline-offset: 5px; }
.mp-dock:has(.zcq) .mp-dock-x { position: relative; z-index: 1; width: 38px; height: 38px; border: 2px solid #5b544a; border-radius: 3px; background: linear-gradient(#4a4741, #2c2a26);
  color: #e9e4da; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 2px 4px rgba(0, 0, 0, .5); }
.mp-dock:has(.zcq) .mp-dock-body { padding: 6px 12px 16px; }

.zcq { container-type: inline-size; color: #e9e4da; }
.zcq-tabs { display: flex; gap: 4px; margin: 4px 4px 0; }
.zcq .zcq-tabs button { flex: 1 1 0; min-width: 0; min-height: 34px; padding: 4px 6px; border: 1px solid #3d3a34; border-bottom: 0; border-radius: 6px 6px 0 0;
  background: linear-gradient(#34322d, #24221f); color: #c9c4b8; font: 700 16px/1 var(--display); letter-spacing: .03em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.zcq .zcq-tabs button.on { background: var(--zq-red); border-color: #d9654c; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
.zcq-page { padding: 10px; border: 1px solid #3d3a34; border-radius: 0 0 4px 4px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .5); }

.zcq-head { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 10px; background: linear-gradient(#1d1c19, #141311); border: 1px solid #36332d; border-radius: 3px; }
.zcq-head > b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 21px/1.1 var(--display); }
.zcq-state { color: #a6a294; font-size: 14px; }
.zcq-state.pub { color: var(--ok); }
.zcq .zcq-olive { display: inline-flex; align-items: center; gap: 6px; background: var(--zq-olive); border: 1px solid var(--zq-olive-line); color: #f1eee2; font: 700 14px/1.1 var(--display); letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 2px rgba(0, 0, 0, .5); }
.zcq-ico { flex: none; width: 20px; height: 20px; object-fit: contain; vertical-align: middle; }

.zcq-cols { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@container (min-width: 540px) { .zcq-cols { grid-template-columns: minmax(0, 1fr) 210px; } .zcq-paper { position: sticky; top: 0; } }
.zcq-main { min-width: 0; }

/* sections: olive head bar, dark body */
.zcq-sec { margin: 0 0 8px; border: 1px solid #3f4630; border-radius: 3px; background: rgba(12, 13, 11, .6); }
.zcq-sech { display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 2px; background: var(--zq-olive); border-bottom: 1px solid transparent; }
.zcq-sec.open > .zcq-sech { border-bottom-color: #2a3019; }
.zcq .zcq-fold { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: none; border: 0; color: #f1eee2; font: 700 17px/1.1 var(--display); text-align: left; text-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
.zcq .zcq-fold:hover { filter: brightness(1.12); }
.zcq-car { width: 12px; font-size: 10px; opacity: .85; }
.zcq-st { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zcq-tools { display: flex; gap: 3px; }
.zcq .zcq-ib { min-width: 30px; min-height: 28px; padding: 0 6px; background: linear-gradient(#3a3d33, #25271f); border: 1px solid #5d6545; font-size: 14px; }
.zcq .zcq-ib:disabled { opacity: .35; cursor: default; }
.zcq-secb { padding: 6px 10px 10px; }

/* fields: label above, dark inset inputs */
.zcq-f { display: block; margin: 6px 0 0; }
.zcq-f > span { display: block; margin: 0 0 3px; color: #cfc9ba; font-size: 13.5px; }
.zcq .zcq-f input, .zcq .zcq-f textarea, .zcq .zcq-f select { display: block; width: 100%; }
.zcq button { background: linear-gradient(#37352f, #24221f); border-color: #4d483e; }
.zcq input, .zcq select, .zcq textarea { min-height: 32px; background: #0a0b0a; border: 1px solid #4a463d; border-radius: 3px; color: #ece7dc; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6); }
.zcq input[type=checkbox] { min-height: 0; box-shadow: none; }
.zcq textarea { resize: vertical; }
.zcq input::placeholder, .zcq textarea::placeholder { color: #8a867b; }
.zcq-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 8px; }
.zcq-num { display: inline-flex; align-items: center; gap: 8px; }
.zcq-num > span { display: inline-flex; align-items: center; gap: 4px; color: #cfc9ba; font-size: 13.5px; }
.zcq .zcq-num input { width: 76px; }
.zcq-nums .zcq-num { justify-content: space-between; }
.zcq .card { background: rgba(255, 255, 255, .03); border: 1px solid #36332d; border-radius: 3px; }
.zcq .dim { color: #a6a294; }
.zcq .zcq-add { display: block; width: 100%; margin: 0 0 8px; border-style: dashed; background: rgba(0, 0, 0, .3); color: #cfc9ba; }

/* guided mode */
.zcq-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; }
.zcq .zcq-steps button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 9px 2px 3px; background: linear-gradient(#2f2d29, #201f1c); border-color: #3d3a34; color: #bdb8ab; font: 600 13px/1 var(--body); border-radius: 14px; }
.zcq-steps i { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #45423b; color: #fff; font: 700 12px/1 var(--display); font-style: normal; }
.zcq .zcq-steps button.done i { background: #55603a; }
.zcq .zcq-steps button.on { background: var(--zq-red); border-color: #d9654c; color: #fff; }
.zcq .zcq-steps button.on i { background: rgba(0, 0, 0, .3); }
.zcq-ask { margin: 12px 0 5px; padding: 4px 8px; background: var(--zq-olive); border-left: 3px solid #a8b97a; border-radius: 2px; color: #f1eee2; font: 700 16px/1.15 var(--display); }
.zcq-ask:first-child { margin-top: 0; }
.zcq-help { margin: 2px 0 6px; font-size: 12.5px; }

/* the paper column */
.zcq-paper { position: relative; padding: 14px 10px; color: var(--paper-ink); border-radius: 2px;
  background: radial-gradient(circle at 88% 94%, rgba(140, 20, 10, .45) 0 6px, transparent 7px), radial-gradient(circle at 80% 90%, rgba(140, 20, 10, .3) 0 3px, transparent 4px),
    var(--paper-grain), linear-gradient(170deg, #e9dfc4, #d6c8a2 70%, #cdbd93);
  box-shadow: inset 0 0 26px rgba(120, 90, 40, .35), 0 3px 10px rgba(0, 0, 0, .55); }
.zcq-paper::before { content: ""; position: absolute; top: -8px; left: 16px; width: 44px; height: 18px; transform: rotate(-14deg); background: rgba(220, 210, 170, .7); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.zcq .zcq-hand { margin: 0 0 10px; color: #2c2a24; letter-spacing: 0; text-transform: none; font: 600 23px/1.1 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; text-align: center; transform: rotate(-3deg);
  text-decoration: underline 2px #b8402c; text-underline-offset: 6px; }
.zcq .zcq-tpl { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 8px; text-align: left; white-space: normal;
  background: linear-gradient(#f1e9d2, #e0d3b0); border: 1px solid #b6a57d; border-radius: 3px; color: #1f1e1a; box-shadow: 0 2px 4px rgba(60, 40, 10, .35); }
.zcq .zcq-tpl:hover { filter: brightness(1.04); border-color: #8c7a50; }
.zcq .zcq-tpl.on { background: linear-gradient(#f6eed8, #e6d9b6); color: #1f1e1a; border-color: #b8402c; box-shadow: 0 0 0 2px rgba(184, 64, 44, .45), 0 2px 4px rgba(60, 40, 10, .35); }
.zcq-tpl .zcq-ico { width: 40px; height: 40px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.zcq-tpl b { display: block; font: 800 17px/1.05 var(--display); }
.zcq-tpl small { display: block; margin-top: 2px; color: #3f3c33; font-size: 12px; line-height: 1.25; }
.zcq-pnote, .zcq-pmeta { margin: 4px 0 0; color: #554f40; font-size: 12px; }
.zcq-pmeta { margin: 0 0 8px; text-align: center; }
.zcq-pst { margin: 0 0 8px; padding: 0 0 6px; border-bottom: 1px dashed rgba(60, 50, 30, .35); }
.zcq-pst b { display: block; font: 700 15px/1.15 var(--display); }
.zcq-pst small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.3; color: #3a362c; }
.zcq-perr { margin: 6px 0 0; color: #9a2516; font-weight: 600; font-size: 13px; }
@container (max-width: 539px) { .zcq-paper.tpl { order: -1; } .zcq-paper.tpl .zcq-tpl small { display: none; } }

/* bottom: the big red button, hazard stripes in the corner */
.zcq-foot { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; padding: 8px 0 2px; }
.zcq-foot-l, .zcq-foot-r { flex: 1 1 0; display: flex; gap: 6px; }
.zcq-foot-r { justify-content: flex-end; }
.zcq-foot::after { content: ""; position: absolute; right: 0; bottom: -10px; width: 90px; height: 8px; opacity: .5; pointer-events: none;
  background: repeating-linear-gradient(-45deg, #d9a52b 0 8px, transparent 8px 16px); }
.zcq .zcq-save { min-height: 46px; min-width: 200px; padding: 6px 26px; background: var(--zq-red); border: 2px solid #e2725a; border-radius: 4px; color: #fff;
  font: 900 21px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .25), 0 3px 8px rgba(0, 0, 0, .6); }
@container (max-width: 539px) { .zcq-foot { flex-wrap: wrap; } .zcq .zcq-save { order: -1; flex: 1 1 100%; min-width: 0; } }

/* the quest list */
.zcq-qcard { margin: 0 0 8px; padding: 8px 10px; background: rgba(255, 255, 255, .03); border: 1px solid #3d3a34; border-left: 4px solid #6b665a; border-radius: 3px; }
.zcq-qcard.pub { border-left-color: #b8402c; }
.zcq-qcard > .row:last-child { justify-content: flex-start; }
.zcq-qcard > .row:first-child b { font: 700 18px/1.1 var(--display); }
@media (max-width: 760px) { .mp-dock:has(.zcq) { width: auto; } .mp-dock:has(.zcq) .zc-panel-title { font-size: 24px; } }

/* ---- Atelier, one editor (owner 2026-11-09: "deux modules mal cousus", "les menus volent l'espace"): the step bar in the
   strip, the tools of the step in the rail, a narrow panel that folds to its title, the selection on top of it */
.mp-strip .gd-bar { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.gd-pname { flex: 0 1 auto; min-width: 0; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--amber); font-size: 14px; }
.mp-ui .gd-homeb { min-height: 0; padding: 1px 7px; font-size: 15px; }
.gd-steps { display: flex; align-items: center; flex: none; gap: 2px; margin: 0; padding: 0; list-style: none; }
.gd-steps li { display: flex; align-items: center; flex: none; white-space: nowrap; }
.mp-ui .gd-steps button { display: inline-flex; align-items: center; gap: 4px; min-height: 0; padding: 2px 4px; border: 0; background: none; color: #bdbab0; font-size: 12.5px; white-space: nowrap; }
.gd-steps i { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; font-style: normal; font-weight: 700; font-size: 11px; background: rgba(255, 255, 255, .12); color: #fff; }
.gd-steps button.done i { background: #3f7a2c; } .mp-ui .gd-steps button.cur { color: #fff; font-weight: 700; } .gd-steps button.cur i { background: var(--amber); color: #111; }
.gd-steps li + li::before { content: ""; display: block; width: 6px; height: 1px; margin: 0 1px; background: rgba(255, 255, 255, .3); }
.gd-ur { display: inline-flex; gap: 2px; margin-left: auto; }
.mp-ui .gd-ur button, .mp-ui .gd-back { min-height: 0; padding: 2px 8px; font-size: 14px; }
.mp-ui .gd-next { flex: none; display: grid; justify-items: start; min-height: 0; padding: 3px 12px; line-height: 1.15; font-size: 13.5px; white-space: nowrap; }
.gd-next small { font-size: 11px; font-weight: 500; opacity: .85; }
.gd-finbar { color: #9fe07f; font-weight: 600; font-size: 13px; white-space: normal; }
.gd-sayline { flex: 1 1 100%; display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 13px; color: #f1efe8; }
.gd-sayline > b { flex: none; color: var(--amber); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; }
/* the check while drawing (roadtool.js liveSay): its warning first, lit apart from the gesture that follows */
.gd-say .gd-live { color: #ff9b84; font-weight: 700; }
.gd-say .gd-live[data-glive] { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
/* the free-turn handle under the mouse */
body.at-rothover .leaflet-container, body.at-rothover .leaflet-container * { cursor: grab !important; }
body.at-rotating .leaflet-container, body.at-rotating .leaflet-container * { cursor: grabbing !important; }
.at-stopt { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
body.gd-grab .leaflet-container { cursor: move !important; }
/* the panel: small type, folds to its title bar */
.gd-dock .gd { gap: 8px; }
.gd-dock .gd-step { padding: 7px 8px; gap: 6px; }
.gd-dock .gd h3 { font-size: 14.5px; }
.gd-dock .gd-what { font-size: 12.5px; line-height: 1.35; color: #c9c6bb; }
body.at-fold .mp-dock .mp-dock-body { display: none; }
body.at-fold.mp-atelier .mp-dock { width: auto; }
.mp-ui .gd-acts { display: grid; gap: 4px; }
.mp-ui .gd-act { display: grid; gap: 0; text-align: left; white-space: normal; min-height: 0; padding: 5px 9px; background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .16); }
.mp-ui .gd-act.on, .mp-ui .gd-act:hover { border-color: var(--amber); background: rgba(224, 163, 58, .16); }
.gd-act b { font-size: 13.5px; color: #fff; } .gd-act small { color: var(--dim); font-size: 11.5px; font-weight: 500; }
/* the selection on top of the panel: type chips, the height along the road, its decks */
.at-sel { display: grid; gap: 5px; padding: 7px 8px; border: 1px solid rgba(255, 138, 110, .55); background: rgba(200, 64, 46, .08); }
.at-sel .row { margin: 0; }
.at-sel .lab { font-size: 11.5px; font-weight: 700; color: var(--dim); } .at-sel .lab small { font-weight: 500; }
.mp-ui .at-wid button { min-height: 0; padding: 2px 7px; font-size: 12px; }
.mp-ui .at-wid button.on { border-color: var(--amber); background: rgba(224, 163, 58, .22); color: #fff; }
.at-deck { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12.5px; }
.at-deck > span:first-child { flex: 1 1 110px; } .at-deck small { color: var(--dim); }
.at-lv { display: inline-block; min-width: 44px; padding: 0 4px; text-align: center; color: #ffe14b; font-size: 12.5px; line-height: 24px; border-top: 1px solid var(--win-line); border-bottom: 1px solid var(--win-line); }
.mp-ui .at-deck .seg button { min-height: 0; padding: 1px 9px; font-weight: 700; }
.mp-ui .at-deck select { max-width: 110px; padding: 1px 3px; }
.mp-ui details.at-more { margin-top: 2px; padding-top: 4px; }
.mp-ui details.at-more > summary { font-size: 12.5px; }
/* the town templates: categories, cards with their variants */
.gd-cats { display: flex; flex-wrap: wrap; gap: 3px; }
.mp-ui .gd-cats button { min-height: 0; padding: 2px 8px; font-size: 12.5px; }
.mp-ui .gd-cats button.on { border-color: var(--amber); background: rgba(224, 163, 58, .22); color: #fff; }
.gd-tpls { display: grid; grid-template-columns: 1fr; gap: 6px; }   /* one template a row: its picture panel-wide, readable */
.gd-tplc { display: grid; gap: 2px; padding: 3px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 2px; background: rgba(255, 255, 255, .03); }
.gd-tplc.on { border-color: #7be04b; box-shadow: inset 0 0 0 1px #7be04b; }
.mp-ui .gd-tplb { display: grid; gap: 1px; padding: 0; border: 0; background: none; text-align: left; white-space: normal; min-height: 0; }
.gd-tplb canvas { width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 2px; }
/* a short screen (1280 x 800): flatter pictures, two template cards in sight without scrolling (owner's mouse walk-through 2026-11-14) */
@media (max-height: 860px) { .gd-tplb canvas { aspect-ratio: 2 / 1; object-fit: contain; background: #1a2416; } .gd-tplb small { -webkit-line-clamp: 2; } }
.gd-tplb b { font-size: 12.5px; color: #fff; } .gd-tplb small { font-size: 11px; color: var(--dim); font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }   /* the whole text in the tooltip */
.gd-var { display: flex; align-items: center; justify-content: space-between; }
.mp-ui .gd-var button { min-height: 0; padding: 0 9px; font-size: 15px; }
.gd-var small { color: #c9c6bb; font-size: 11px; }
/* the step bar stays one line and inside the strip: the main button and the finished words shrink before anything leaves it */
.mp-ui .gd-next { min-width: 0; max-width: 240px; flex: 0 1 auto; }
.gd-next small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mp-strip .gd-finbar { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* every step named; short names when the bar lacks room, then the done steps keep only their ✓ (roadpanels.js fitBar) */
.gd-steps .s { display: none; }
.gd-bar.gd-tight .gd-steps .f { display: none; } .gd-bar.gd-tight .gd-steps .s { display: inline; } .gd-bar.gd-tight .gd-steps button.cur .f { display: inline; } .gd-bar.gd-tight .gd-steps button.cur .s { display: none; }
.mp-strip .gd-bar.gd-tighter { flex-wrap: wrap; row-gap: 4px; }   /* too narrow for one line: the steps get a line of their own, every name kept */
.gd-bar.gd-tighter .gd-steps { order: 9; flex: 1 0 100%; }
.mp-strip .gd-bar .gd-steps { flex: 0 1 auto; min-width: 0; overflow: hidden; }   /* last resort: the steps give way, never the main button */
.mp-ui .gd-steps button:not(.cur):not(.done) { color: #d9d6cc; }
@media (max-width: 1400px) { .mp-ui .gd-next { max-width: 200px; } }
/* the long profile's legend, under it */
.at-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 2px 0 4px; font-size: 11.5px; color: #bdbab0; }
.at-legend i { display: inline-block; margin-right: 4px; font-style: normal; vertical-align: middle; }
.at-legend .lg-deck { width: 16px; height: 6px; background: #ffb21e; border: 1px solid #0b0d0c; }
.at-legend .lg-ramp { width: 14px; height: 3px; background: rgba(255, 225, 75, .75); transform: rotate(-20deg); }
.at-legend .lg-x { color: #fff; font-size: 9px; } .at-legend .lg-u { color: #5ab4ff; font-weight: 700; }
/* the step's help folded while something is picked: one line */
.gd-stepd > summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.gd-stepd > summary::-webkit-details-marker { display: none; }
.gd-stepd > summary::before { content: "▸"; color: var(--dim); } .gd-stepd[open] > summary::before { content: "▾"; }
.gd-stepd > summary h3 { margin: 0; }
.gd-stepd:not([open]) { padding-top: 6px; padding-bottom: 6px; }
/* a short screen: the rail's buttons smaller, so every tool of Plan libre fits above the bottom bar */
@media (max-height: 800px) { .mp-rail button { width: 36px; height: 32px; } .mp-rail button svg { width: 20px; height: 20px; } .mp-rail { gap: 1px; padding: 3px; } }
/* blind test 3: the step's gestures always on top of the panel (compact while something is in hand), the bridge's choices
   (what it crosses, its height) under « Ajouter un pont », the tool's options in the panel instead of a third row over the map */
.gd-top { display: grid; gap: 6px; }
.mp-ui .gd-acts.compact .gd-act { padding: 3px 9px; }
.gd-acts.compact .gd-act small { display: none; }
.gd-act kbd { margin-left: 4px; padding: 0 4px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 2px; font: 600 10.5px/1.4 var(--body); color: var(--dim); vertical-align: 1px; }
.gd-bridge { display: grid; gap: 5px; padding: 6px 7px; border: 1px solid rgba(90, 180, 255, .45); background: rgba(90, 180, 255, .06); }
.gd-bridge .gd-chip small { font-weight: 500; opacity: .8; font-size: 11px; }
.mp-ui .gd-bridge .gd-chip.on { border-color: #5ab4ff; background: rgba(90, 180, 255, .24); color: #fff; }
.mp-ui .gd-pickx { justify-self: start; }
.gd-top .at-stopt.at-tool { flex: none; padding-top: 0; border-top: 0; gap: 4px 6px; font-size: 12.5px; }
.gd-top .at-tool .seg button { padding: 1px 6px; }
.gd-sent { color: #cfe9ff; }
.gd-lab.gd-new { margin-top: 4px; }
/* ---- the rail with names (owner 2026-11-11: « présentation des outils ») : icon + name + key chip, families titled, the tool
   in hand lit; « Réduire » folds it to the icons (.at-rail-short), « ? Touches » opens the sheet of every key (.at-keys) */
.mp-rail { align-items: stretch; width: 148px; }
.mp-rail button { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: auto; height: 32px; padding: 0 6px; text-align: left; }
.mp-rail button svg { flex: none; width: 20px; height: 20px; }
.mp-rail button .nm { flex: 1; min-width: 0; overflow: hidden; font: 600 12.5px/1.1 var(--body); white-space: nowrap; text-overflow: ellipsis; }
.mp-rail button .k { position: static; flex: none; min-width: 16px; padding: 1px 3px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 2px; font: 700 10px/1.2 var(--body); text-align: center; color: var(--dim); }
.mp-rail button.on .k { border-color: rgba(255, 210, 198, .6); }
.mp-rail .at-fam { margin-top: 3px; padding: 5px 4px 2px; text-align: left; font-size: 9px; }
.mp-rail .at-rail-fold { height: 22px; justify-content: center; color: var(--dim); font: 600 11px/1 var(--body); }
.mp-rail .at-rail-keys b { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid currentColor; border-radius: 50%; font: 700 12px/1 var(--body); }
.mp-rail.at-rail-short { width: auto; align-items: center; }
.mp-rail.at-rail-short button { justify-content: center; width: 42px; height: 36px; padding: 0; }
.mp-rail.at-rail-short button .nm { display: none; }
.mp-rail.at-rail-short button .k { position: absolute; right: 1px; bottom: 1px; min-width: 0; padding: 0; border: 0; font-size: 9.5px; }
.mp-rail.at-rail-short .at-rail-fold { height: 20px; width: 42px; }
@media (max-height: 800px) { .mp-rail button { height: 28px; } .mp-rail button svg { width: 18px; height: 18px; } .mp-rail .at-fam { padding-top: 3px; margin-top: 1px; } }
@media (max-width: 760px) { .mp-rail, .mp-rail.at-rail-short { width: auto; } .mp-rail button .nm { display: none; } }
/* the selection's actions: one row of small buttons, each with its key */
.at-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.at-acts .at-act { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; font-size: 12px; }
.at-acts .at-act svg { width: 15px; height: 15px; }
.at-acts .at-act kbd { padding: 0 3px; font-size: 10px; }
.at-rothint { margin: 4px 0 0; }
.at-rothint b, .at-keys .at-k-live { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #ffe14b; color: #0b0d0c; font-size: 12px; }
.at-keys .at-k-live { background: none; border: 2px solid #ff5a3c; color: #ff5a3c; width: 15px; height: 15px; }
/* « ? »: every key on one sheet, over the map */
.at-keys { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: rgba(0, 0, 0, .45); }
.at-keys-in { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow: auto; padding: 12px 16px 14px; }
.at-keys-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.at-keys-h b { font: 700 17px/1 var(--display, var(--body)); color: #fff; text-transform: uppercase; letter-spacing: .03em; }
.at-keys-h .dim { flex: 1; font-size: 12px; }
.at-keys-h button { width: 28px; height: 28px; font-size: 18px; }
.at-keys-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 6px 18px; }
.at-keys h5 { margin: 6px 0 4px; color: var(--amber); font: 700 11px/1 var(--body); letter-spacing: .05em; text-transform: uppercase; }
.at-keys table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.at-keys td { padding: 3px 4px; border-top: 1px solid rgba(255, 255, 255, .07); vertical-align: top; color: #d6d8d1; }
.at-keys td:first-child { width: 1%; white-space: nowrap; }
.at-keys td i { margin: 0 2px; color: var(--dim); font-style: normal; }
.at-keys kbd { padding: 0 5px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 2px; background: rgba(255, 255, 255, .08); font: 600 11.5px/1.5 var(--body); color: #f1efe8; }
.mp-rail button .k, .at-keys kbd, .at-acts kbd { font-family: Consolas, "Cascadia Mono", ui-monospace, monospace; }
/* ---- Territories (Bobsta 2026-11-12, territory.js): a point's type icon ringed in its crew's colour, one small label line above a town
   held whole ("Sous contrôle de") or by half ("Influence"), the swatch in the Legend and the panel. */
.tr-vx { background: #fff; border: 2px solid #111; border-radius: 50%; box-sizing: border-box; cursor: move; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.tr-vx.mid { background: rgba(255, 255, 255, .55); border-width: 1px; cursor: copy; }
.tr-pt img { width: 26px; height: 26px; padding: 2px; background: rgba(10, 11, 11, .82); border: 2px solid var(--off); border-radius: 50%; box-sizing: border-box; }
/* the Radar's watches (Bobsta 2026-11-17, territory.js radarPaint) */
.tr-radar-pl { pointer-events: none; color: #e9f7ff; font: 600 11px/16px system-ui, sans-serif; text-shadow: 0 0 3px #000, 0 0 2px #000; white-space: nowrap; }
.tr-radar-pl i { display: inline-block; width: 8px; height: 8px; margin: 0 4px -1px -4px; border-radius: 50%; background: #38d6ff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .6); }
.tr-radar-pl.tr-enemy { color: #ff6b60; }
.tr-radar-pl.tr-enemy i { background: #ff5a4e; }
.tr-radar-pl.tr-ko { font-style: italic; }
.tr-radar-pl.tr-ko i { border-radius: 0; transform: rotate(45deg); background: #f2c94c; }   /* knocked down: a yellow diamond */
.tr-radar-tag { pointer-events: none; color: #cfd3d0; font: 600 11px/18px system-ui, sans-serif; text-shadow: 0 0 3px #000; white-space: nowrap; }
/* strategic vs logistic flags (Bobsta 2026-11-19: "pas tres visible"): strategic bigger, thick gold ring, a gold star;
   logistic smaller, grey ring, dimmed */
.tr-pt img.tr-strat { box-shadow: 0 0 0 3px #e7c55a, 0 0 8px rgba(231, 197, 90, .85); }
.tr-pt img.tr-log { width: 21px; height: 21px; margin: 2px; border-color: #9aa0a3 !important; filter: saturate(.55) brightness(.9); opacity: .9; }
.tr-pt .tr-star { position: absolute; right: -7px; top: -9px; color: #f2cf5b; font: 900 14px/1 system-ui, sans-serif; text-shadow: 0 0 2px #000, 0 0 3px #000; pointer-events: none; }
.zc-mid .tr-pt .tr-star { right: -3px; top: -4px; font-size: 11px; }
.zc-far .tr-pt .tr-star { right: 2px; top: 1px; font-size: 9px; }
.tr-pt.tr-drag img { cursor: grab; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.tr-town { pointer-events: none; }
.tr-town span { display: block; transform: translate(-50%, -100%); width: max-content; max-width: 240px; padding: 1px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 11px/1.3 var(--body); color: #fff; background: rgba(10, 11, 11, .9); border-left: 4px solid var(--c); border-bottom: 2px solid var(--c);
  border-radius: 2px; text-shadow: 0 1px 2px #000, 0 0 3px #000; box-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
/* always readable whatever the crew colour or the ground under it (Bobsta 2026-11-17): white text, crew colour only on the edges */
.tr-town span small { color: #fff; font: 700 9.5px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; }
.tr-town span em { margin: 0 4px; color: #cfd2d4; font: italic 400 10px/1 var(--body); }
.tr-town.influence span { font-weight: 600; border-left-style: dashed; border-bottom-style: dashed; }
.tr-sw { display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; background: var(--off); border: 1px solid rgba(255, 255, 255, .35); flex: none; }
/* Crew blason (Bobsta 2026-11-14, /blason.mjs, docs/faction-identity.md): inline in labels and tooltips, a badge on a held
   point's flag and at a safehouse's corner. Edited on /factions/ (factions/paint.mjs), no longer here. */
.tr-bl { display: inline-block; vertical-align: middle; margin-right: 4px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.tr-town span .tr-bl { vertical-align: -3px; margin-right: 3px; }
.tr-housebl { pointer-events: none; }
.tr-housebl svg { display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.tr-tipcrew { display: inline-flex; align-items: center; font-weight: 600; }
/* A captured point's flag (Bobsta 2026-11-15, territory.js flagHtml): a pole, a cloth in the crew colour with its blason,
   the type icon small at the foot. Its foot sits on the point (the marker's middle). */
.tr-flag { position: absolute; left: 0; top: 0; width: 26px; height: 26px; transition: transform .15s; transform-origin: 50% 80%;
  filter: drop-shadow(0 0 1px #000) drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.tr-flag .tr-pole { position: absolute; left: 12px; bottom: 10px; width: 2px; height: 32px; border-radius: 2px; background: linear-gradient(90deg, #e2ded3, #6d6a62); box-shadow: 0 0 2px rgba(0, 0, 0, .9); }
.tr-flag .tr-cloth { position: absolute; left: 14px; bottom: calc(8px + 12px * var(--up, 1)); transition: bottom 1.5s ease-out; display: flex; align-items: center; justify-content: center; width: 30px; height: 21px;
  background: var(--c); clip-path: polygon(0 0, 100% 0, 86% 50%, 100% 100%, 0 100%); }
.tr-flag .tr-cloth svg { display: block; height: 18px; width: auto; margin-left: -2px; }
.tr-pt .tr-flag img { position: absolute; left: 4px; bottom: -1px; width: 19px; height: 19px; padding: 1px; border-width: 2px; }
.tr-pt.tr-drag .tr-flag img { cursor: grab; }
.tr-colorbtn { display: flex; align-items: center; gap: 4px; text-decoration: none; margin: 6px 0 0; padding: 3px 8px; color: var(--text); background: transparent; border: 1px solid var(--win-line-soft, rgba(255, 255, 255, .2)); border-radius: 2px; font: 600 12.5px/1.2 var(--body); cursor: pointer; }
/* The Airfield's airdrop (Bobsta 2026-11-24): the landed crate for 2 minutes, the leader's spot, the pick buttons. */
.tr-air { display: flex; align-items: center; gap: 6px; pointer-events: none; }
.tr-air b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(20, 16, 8, .85); border: 3px solid #ffcf4a; font-size: 20px; animation: tr-air-pulse 1.2s ease-in-out infinite; }
.tr-air span { display: flex; flex-direction: column; padding: 3px 7px; background: rgba(20, 16, 8, .85); color: #ffe08a; font: 700 13px/1.2 var(--body); border-radius: 2px; white-space: nowrap; }
.tr-air small { color: #f4ead0; font-weight: 600; }
.tr-air-mine b { width: 26px; height: 26px; font-size: 14px; border-style: dashed; animation: none; }
@keyframes tr-air-pulse { 50% { box-shadow: 0 0 0 10px rgba(255, 207, 74, .25); } }
.tr-airbox { display: grid; gap: 4px; margin: 6px 0 0; }
.tr-airrow { display: grid; gap: 2px; }
.tr-airrow .tr-colorbtn { margin: 0; }
/* A Factions link temporarily opens one territory: the card remains readable while the true border is highlighted. */
.mp-ui .tr-focus-card { padding: 12px; border-color: rgba(255, 209, 107, .55); background: rgba(241, 183, 74, .08); line-height: 1.5; }
.mp-ui .tr-focus-card > b:first-child { display: inline-block; margin-bottom: 5px; color: #ffdc8f; font: 700 19px/1.2 var(--display); }
.mp-ui .tr-focus-back { display: inline-flex; align-items: center; min-height: 28px; color: #ffdc8f; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.mp-ui .tr-focus-back:hover, .mp-ui .tr-focus-back:focus-visible { color: #fff2c7; }
@media (max-width: 760px) {
  .mp-ui .tr-focus-actions { flex-direction: column; align-items: flex-start; gap: 8px; }
}
/* Less clutter when zoomed out (Bobsta 2026-11-15; index.html zoomClass + declutter): zc-mid / zc-far on the map's
   container. Territory flags become small rings in their crew's colour, parked cars shrink, safehouse names go (the
   diamond and its tooltip stay); a name that would overlap a more important one is hidden (zc-lblhide). */
.zc-lblhide { visibility: hidden; }
.tr-pt img, .vfig, .vpin { transition: transform .15s; }
.zc-mid .tr-pt img { transform: scale(.75); }
.zc-mid .vfig { transform: scale(.7); transform-origin: 50% 71%; }
.zc-far .tr-pt img { transform: scale(.42); border-width: 5px; object-position: -99px 0; }
.zc-mid .tr-pt .tr-flag { transform: scale(.7); }
/* 300+ points (Bobsta 2026-11-19: "la carte doit rester visible"): neutral icons small and faint from mid zoom, gone far
   out; a held point far out is only a dot in its crew's colour (no pole, no cloth) */
.zc-mid .tr-pt.tr-neutral img { transform: scale(.55); opacity: .75; }
.zc-far .tr-pt.tr-neutral { display: none; }
.zc-mid path.tr-zone-neutral { stroke-width: 1.6px; stroke-opacity: .7; }
.zc-mid path.tr-zone-neutral.tr-casing { stroke-width: 3px; stroke-opacity: .5; }
.zc-far path.tr-zone-neutral { stroke-width: 1px; stroke-opacity: .45; stroke-dasharray: 3 4; }
.zc-far path.tr-zone-neutral.tr-casing { stroke-width: 2px; stroke-opacity: .35; stroke-dasharray: none; }
.zc-far .tr-pt .tr-flag .tr-pole, .zc-far .tr-pt .tr-flag .tr-cloth { display: none; }
.zc-mid .tr-pt .tr-flag img, .zc-far .tr-pt .tr-flag img { transform: none; }
.zc-far .tr-pt .tr-flag { transform: none; }
.zc-far .tr-pt .tr-flag img { transform: scale(.42); border-width: 6px; border-color: var(--c) !important; object-position: -99px 0; }
.zc-far .vfig { transform: scale(.45); transform-origin: 50% 71%; }
.zc-far .vfig::before { display: none; }
.zc-mid .vpin { transform: scale(.8); }
.zc-far .vpin { transform: scale(.5); }
.zc-far .pin.house span { display: none; }
.zc-far .tr-housebl { display: none; }
