/* Embervale Watch map: the shared renderer's styling (themes/epona/js/enshrouded-map.js), used by the
   panel tool and the public share page. Forked from dimraeth-compass.css; tokens are the tool's own
   (enshrouded-watch.css): moss-dark stone, warm ember, cool frost. Cinzel is self-hosted in
   themes/epona/fonts/ (SIL OFL). Loaded through the panel's file_hash (content-hashed). */
@font-face { font-family: 'Cinzel'; src: url('/themes/epona/fonts/Cinzel-latin-var.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }
.ewm { --bg: #14180f; --panel: #1b2016; --raised: #232920; --hair: #333c2c; --strong: #55614a; --hi: rgba(235,225,190,0.08); --text: #efe6d2; --dim: #cfc6b0; --faint: #9a9280; --ember: #e8902c; --ember-hi: #ffa845; --frost: #7fc4d8; --ok: #86bf63; --danger: #e06a52; --display: 'Cinzel', Georgia, serif; --body: 'Open Sans', system-ui, sans-serif; font-family: var(--body); color: var(--text); }
.ewm { position: absolute; inset: 0; }
.ewm-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.ewm-map.drag { cursor: grabbing; }
.ewm-badge { position: absolute; top: 10px; left: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border-radius: 4px; font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .04em; border: 1px solid var(--hair); color: var(--dim); background: rgba(20,24,15,.9); max-width: calc(100% - 78px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 1px 0 var(--hi); }
/* the badge's sentence wraps between its phrases when the badge is too narrow for it (enshrouded-map.js paintBadge), so its end
   is never cut off; each phrase stays on one line */
.ewm-badge { white-space: normal; }
.ewm-badge-txt { min-width: 0; padding: 3px 0; line-height: 1.3; }
.ewm-seg { white-space: nowrap; }
.ewm-badge-hidden { display: none; }
.ewm-badge-live { color: var(--text); border-color: rgba(232,144,44,.55); }
.ewm-badge-err { color: var(--danger); border-color: rgba(224,106,82,.45); }
.ewm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.ewm-badge-live .ewm-dot { background: var(--ember-hi); box-shadow: 0 0 7px var(--ember); }
.ewm-note { position: absolute; top: 50px; left: 10px; z-index: 3; max-width: min(380px, calc(100% - 78px)); padding: 8px 12px; border-radius: 4px; border: 1px solid var(--hair); background: rgba(20,24,15,.92); color: var(--dim); font-size: 13px; line-height: 1.45; }
.ewm-zoom { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.ewm-zoom button { width: 36px; height: 36px; padding: 0; margin: 0; border: 1px solid var(--strong); border-radius: 4px; background: rgba(20,24,15,.92); color: var(--text); font-family: var(--body); font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 var(--hi); }
.ewm-zoom button:hover { background: var(--raised); color: var(--ember-hi); }
.ewm-zoom button.on { color: var(--ember-hi); border-color: var(--ember); }
.ewm-layers { position: absolute; top: 10px; right: 54px; z-index: 7; width: 312px; max-height: calc(100% - 20px); overflow-y: auto; background: rgba(27,32,22,.97); border: 1px solid var(--strong); border-radius: 4px; padding: 8px 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); scrollbar-width: thin; scrollbar-color: var(--strong) var(--panel); }
.ewm-layers::-webkit-scrollbar { width: 10px; } .ewm-layers::-webkit-scrollbar-track { background: var(--panel); } .ewm-layers::-webkit-scrollbar-thumb { background: var(--hair); border: 2px solid var(--panel); border-radius: 5px; }
.ewm-layer { display: flex; align-items: center; gap: 9px; padding: 6px 2px; font-size: 13px; color: var(--dim); cursor: pointer; border-bottom: 1px solid var(--hair); user-select: none; }
.ewm-layer:hover { color: var(--text); } .ewm-layer.off { opacity: .4; }
.ewm-layer:focus-visible, .ewm-sub-row:focus-visible { outline: 1px solid var(--ember); outline-offset: -1px; }
.ewm-layer .ewm-grow { flex: 1; min-width: 0; }
.ewm-layer .ewm-count { font-family: var(--display); font-size: 12px; color: var(--faint); font-weight: 600; }
.ewm-note2 { display: block; font-size: 11px; color: var(--faint); line-height: 1.3; margin-top: 1px; }
.ewm-sub-row { display: flex; align-items: baseline; gap: 8px; padding: 5px 2px 5px 33px; font-size: 12px; color: var(--dim); cursor: pointer; border-bottom: 1px solid var(--hair); }
.ewm-sub-row em { margin-left: auto; font-style: normal; color: var(--faint); white-space: nowrap; }
.ewm-sub-row:hover { color: var(--ember-hi); }
.ewm-cell { width: 22px; height: 22px; flex: none; display: inline-block; }
.ewm-cell-base { background: center / contain no-repeat; }
.ewm-cell-lm { background-repeat: no-repeat; }
canvas.ewm-cell-ring { width: 22px; height: 22px; }
.ewm-cell-text { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--faint); }
.ewm-sub { font-family: var(--display); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin: 6px 0 4px; }
.ewm-muted { color: var(--faint); font-size: 12px; padding: 8px 0 2px; line-height: 1.5; }
.ewm-legend { position: absolute; left: 10px; bottom: 10px; z-index: 3; display: inline-flex; flex-wrap: wrap; max-width: calc(100% - 150px); border: 1px solid var(--hair); border-radius: 4px; background: rgba(20,24,15,.9); overflow: hidden; }
.ewm-legend-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-right: 1px solid var(--hair); font-size: 12.5px; color: var(--dim); }
.ewm-legend-item:last-child { border-right: none; }
.ewm-scale { position: absolute; right: 10px; bottom: 10px; z-index: 3; color: var(--dim); font-size: 12px; text-align: right; background: rgba(20,24,15,.85); padding: 3px 8px 6px; border-radius: 4px; border: 1px solid var(--hair); }
.ewm-scale-bar { height: 4px; border: 1px solid rgba(239,230,210,.8); border-top: none; box-sizing: border-box; margin-top: 2px; margin-left: auto; }
/* what a mark is, in words: the name, then the facts (a mouse hovers, a finger taps) */
.ewm-tip { position: absolute; z-index: 5; left: 0; top: 0; max-width: 330px; padding: 6px 10px; border: 1px solid var(--strong); border-radius: 4px; background: rgba(27,32,22,.97); color: var(--text); font-size: 12.5px; line-height: 1.4; pointer-events: none; opacity: 0; visibility: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.ewm-tip.on { opacity: 1; visibility: visible; }
.ewm-tip b { display: block; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .03em; color: var(--ember-hi); }
.ewm-tip span { display: block; color: var(--dim); }
.ewm-tip span:empty { display: none; }
.ewm-state { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: flex; align-items: center; gap: 16px; width: min(460px, calc(100% - 40px)); padding: 16px 18px; border-radius: 6px; border: 1px solid var(--strong); background: rgba(27,32,22,.94); box-shadow: 0 12px 34px rgba(0,0,0,.5), inset 0 1px 0 var(--hi); pointer-events: none; }
.ewm-state img { width: 96px; height: 96px; flex: none; }
.ewm-state b { display: block; font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.ewm-state span { display: block; font-size: 13.5px; line-height: 1.5; color: var(--dim); }
.ewm-caption { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 3; max-width: min(520px, calc(100% - 420px)); padding: 6px 12px; border-radius: 4px; border: 1px solid var(--hair); background: rgba(20,24,15,.88); color: var(--dim); font-size: 12.5px; line-height: 1.4; text-align: center; pointer-events: none; }
.ewm-empty { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--dim); font-size: 14px; z-index: 4; background: rgba(20,24,15,.75); }

/* ---- the ground tools (2026-09-24): the search box, the tools in the button column, the card, the ground line ---- */
.ewm-badge { left: 312px; max-width: calc(100% - 480px); }
.ewm-badge.ewm-badge-live, .ewm-badge.ewm-badge-off { cursor: pointer; }
.ewm-note { left: 312px; }
.ewm-find { position: absolute; top: 10px; left: 10px; z-index: 6; width: 292px; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 11px; border: 1px solid var(--strong); border-radius: 4px; background: rgba(20,24,15,.94); box-shadow: inset 0 1px 0 var(--hi); box-sizing: border-box; }
.ewm-find:focus-within { border-color: var(--ember); }
.ewm-find-ico { color: var(--faint); font-size: 13px; flex: none; }
.ewm .ewm-find-in { flex: 1; min-width: 0; height: 32px; margin: 0; padding: 0; border: none; outline: none; background: transparent; box-shadow: none; color: var(--text); font-family: var(--body); font-size: 14px; font-weight: 400; line-height: 32px; }
.ewm .ewm-find-in::placeholder { color: var(--faint); opacity: 1; }
.ewm-find-x { display: none; flex: none; width: 28px; height: 28px; margin: 0; padding: 0; border: none; border-radius: 3px; background: transparent; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; }
.ewm-find.has .ewm-find-x { display: block; }
.ewm-find-x:hover { color: var(--ember-hi); background: var(--raised); }
.ewm-results, .ewm-card { position: absolute; top: 52px; left: 10px; z-index: 7; width: 340px; max-height: calc(100% - 64px); overflow-y: auto; box-sizing: border-box; background: rgba(27,32,22,.97); border: 1px solid var(--strong); border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.5); scrollbar-width: thin; scrollbar-color: var(--strong) var(--panel); }
.ewm-results::-webkit-scrollbar, .ewm-card::-webkit-scrollbar { width: 10px; } .ewm-results::-webkit-scrollbar-track, .ewm-card::-webkit-scrollbar-track { background: var(--panel); } .ewm-results::-webkit-scrollbar-thumb, .ewm-card::-webkit-scrollbar-thumb { background: var(--hair); border: 2px solid var(--panel); border-radius: 5px; }
.ewm-res { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--hair); cursor: pointer; }
.ewm-res:hover, .ewm-res.hot { background: var(--raised); }
.ewm-res-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ewm-res-t b { font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ewm-res.hot .ewm-res-t b { color: var(--ember-hi); }
.ewm-res-t em { font-style: normal; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ewm-res-more { padding: 7px 10px; font-size: 12px; color: var(--faint); line-height: 1.4; }
.ewm-cell-shroud { border-radius: 3px; background: rgba(60,206,222,.5); box-shadow: inset 0 0 0 2px #d6fcff; }
.ewm-cell-build { border-radius: 3px; background: rgba(118,222,92,.75); }
.ewm-cell-deadly { border-radius: 3px; background: rgba(168,110,226,.55); box-shadow: inset 0 0 0 2px #ecd6ff; }
/* the decoded ground's layers (17-terrain-on-the-map.md): caves hatched as the map hatches them, roads in their painted tan */
.ewm-cell-caves { border-radius: 3px; background: repeating-linear-gradient(-45deg, rgba(236,98,74,.95) 0 2px, rgba(226,84,64,.2) 2px 6px); }
.ewm-cell-roads { border-radius: 3px; background: linear-gradient(transparent 38%, #f6e2b2 38% 62%, transparent 62%), rgba(20,24,15,.55); }
/* the Shroud layer's two kinds: the tool's own tick boxes */
.ewm-tick { display: flex; align-items: center; gap: 8px; padding: 6px 2px 6px 33px; font-size: 12.5px; color: var(--dim); cursor: pointer; border-bottom: 1px solid var(--hair); user-select: none; }
.ewm-tick .ewm-cell { width: 16px; height: 16px; }
.ewm-tick:hover { color: var(--text); }
.ewm-tick:focus-visible { outline: 1px solid var(--ember); outline-offset: -1px; }
.ewm-tickbox { flex: none; width: 15px; height: 15px; border: 1px solid var(--strong); border-radius: 3px; background: #10140c; position: relative; }
.ewm-tick.on .ewm-tickbox { background: var(--ember); border-color: var(--ember); }
.ewm-tick.on .ewm-tickbox::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #1a1206; border-width: 0 2px 2px 0; transform: rotate(45deg); }
canvas.ewm-cell-pin { width: 22px; height: 22px; }
.ewm-cell-fa { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.ewm-zsep { display: block; height: 4px; }
.ewm-zoom button.ewm-toolbtn { font-size: 16px; }
.ewm-map.ewm-placing { cursor: crosshair; }
.ewm-card { padding: 10px 12px 12px; color: var(--dim); font-size: 13px; line-height: 1.45; }
.ewm-card p { margin: 6px 0 8px; }
.ewm-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.ewm-card-head b { flex: 1; min-width: 0; font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: .03em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ewm-card-head canvas.ewm-cell-pin { width: 30px; height: 30px; }
.ewm-card-fa { font-size: 16px; color: var(--ember-hi); width: 22px; text-align: center; flex: none; }
.ewm-x { flex: none; width: 30px; height: 30px; margin: 0; padding: 0; border: 1px solid var(--hair); border-radius: 4px; background: transparent; color: var(--dim); font-size: 19px; line-height: 1; cursor: pointer; }
.ewm-x:hover { color: var(--ember-hi); border-color: var(--strong); }
.ewm .ewm-in { display: block; width: 100%; box-sizing: border-box; height: 34px; margin: 0; padding: 0 10px; border: 1px solid var(--hair); border-radius: 4px; background: #10140c; box-shadow: inset 0 1px 2px rgba(0,0,0,.35); color: var(--text); font-family: var(--body); font-size: 14px; font-weight: 400; line-height: normal; outline: none; }
.ewm .ewm-in:focus { border-color: var(--ember); }
.ewm .ewm-in::placeholder { color: var(--faint); opacity: 1; }
.ewm .ewm-card-head .ewm-in { flex: 1; min-width: 0; width: auto; }
.ewm textarea.ewm-in { height: auto; min-height: 54px; padding: 7px 10px; resize: none; line-height: 1.4; margin-top: 10px; }
.ewm-card-lbl { margin: 10px 0 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.ewm-icons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ewm-iconbtn { height: 38px; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--hair); border-radius: 4px; background: #151a11; cursor: pointer; }
.ewm-iconbtn canvas.ewm-cell-pin { width: 28px; height: 28px; }
.ewm-iconbtn:hover { border-color: var(--strong); background: var(--raised); }
.ewm-iconbtn.on { border-color: var(--ember); background: rgba(232,144,44,.14); }
.ewm-colors { display: flex; gap: 9px; }
.ewm-colorbtn { width: 26px; height: 26px; margin: 0; padding: 0; border-radius: 50%; border: 2px solid rgba(20,24,15,.95); box-shadow: 0 0 0 1px var(--hair); cursor: pointer; }
.ewm-colorbtn.on { box-shadow: 0 0 0 2px var(--text); }
.ewm .ewm-switch { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; line-height: 1.35; }
.ewm-switch em { font-style: normal; font-weight: 400; color: var(--faint); font-size: 12px; }
.ewm .ewm-switch input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 36px; height: 20px; margin: 0; border-radius: 10px; background: var(--hair); border: 1px solid var(--strong); position: relative; cursor: pointer; transition: background .15s; }
.ewm .ewm-switch input[type="checkbox"]::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--dim); transition: left .15s, background .15s; }
.ewm .ewm-switch input[type="checkbox"]:checked { background: rgba(232,144,44,.3); border-color: var(--ember); }
.ewm .ewm-switch input[type="checkbox"]:checked::after { left: 18px; background: var(--ember-hi); }
.ewm .ewm-switch input[type="checkbox"]:focus-visible { outline: 2px solid rgba(232,144,44,.5); outline-offset: 1px; }
.ewm-card-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ewm-btn { height: 32px; margin: 0; padding: 0 12px; border-radius: 4px; border: 1px solid #0d1109; background: linear-gradient(180deg, #353e2f, #2a3125); color: var(--text); font-family: var(--body); font-size: 13px; font-weight: 400; white-space: nowrap; cursor: pointer; box-shadow: inset 0 1px 0 rgba(235,225,190,.1), inset 0 -1px 0 rgba(0,0,0,.4); }
.ewm-btn:hover:not([disabled]) { color: var(--ember-hi); border-color: var(--strong); }
.ewm-btn.on { color: var(--ember-hi); border-color: var(--ember); }
.ewm-btn.go { background: linear-gradient(180deg, #f3a04a, #d97e20); border-color: #8a4c10; color: #1a1206; font-weight: 700; }
.ewm-btn.go:hover:not([disabled]) { color: #1a1206; filter: brightness(1.06); }
.ewm-btn[disabled] { opacity: .45; cursor: default; }
.ewm-status { margin-left: auto; font-size: 12px; color: var(--faint); }
.ewm-status.bad { color: var(--danger); }
.ewm-confirm { display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px; border: 1px solid rgba(224,106,82,.45); border-radius: 4px; background: rgba(224,106,82,.1); color: var(--text); }
.ewm-confirm.open { display: flex; }
.ewm-confirm span { flex: 1; min-width: 120px; }
.ewm-big { font-family: var(--body); font-size: 21px; font-weight: 700; color: var(--text); margin: 4px 0 2px; }
.ewm-big span { font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--faint); }
.ewm-hint2 { font-size: 12px; color: var(--faint); margin: 8px 0 0; }
.ewm-build { padding: 2px 2px 10px 33px; border-bottom: 1px solid var(--hair); }
.ewm-build-words { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
.ewm .ewm-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 22px; margin: 4px 0 0; padding: 0; background: transparent; cursor: pointer; }
.ewm .ewm-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--hair); }
.ewm .ewm-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--hair); }
.ewm .ewm-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--ember-hi); border: 2px solid #1a1206; }
.ewm .ewm-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ember-hi); border: 2px solid #1a1206; }
.ewm .ewm-range:focus-visible { outline: 1px solid var(--ember); outline-offset: 2px; }
.ewm-tip b:empty { display: none; }
.ewm-tip.ground span { color: var(--text); }
/* the third row of a tip: what the game puts in a chest, a body or an enemy */
.ewm-tip em { display: block; font-style: normal; color: var(--ember-hi); }
.ewm-tip em:empty { display: none; }

/* ---- the Layers menu in folding groups (2026-09-24): Your world, The game's map, Things to find, The land ---- */
.ewm-group { display: flex; align-items: center; gap: 8px; padding: 6px 2px; cursor: pointer; border-bottom: 1px solid var(--hair); user-select: none; font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--text); }
.ewm-glabel { flex: none; white-space: nowrap; }
/* what a folded group holds, on the same line: the layers switched on */
.ewm-gsum { flex: 1; min-width: 0; text-align: right; font-family: var(--body); font-size: 11.5px; font-weight: 400; letter-spacing: 0; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ewm-group:hover { color: var(--ember-hi); }
.ewm-group:focus-visible { outline: 1px solid var(--ember); outline-offset: -1px; }
.ewm-chev { flex: none; width: 14px; height: 14px; position: relative; }
.ewm-chev::after { content: ''; position: absolute; left: 3px; top: 3px; width: 6px; height: 6px; border: solid var(--faint); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .12s; }
.ewm-group.open .ewm-chev::after { transform: rotate(45deg); left: 4px; top: 1px; }
.ewm-group-body { padding: 0 0 4px 8px; border-left: 1px solid var(--hair); margin-left: 6px; }
.ewm-honest { font-size: 11.5px; line-height: 1.35; color: var(--faint); padding: 5px 2px 4px; border-bottom: 1px solid var(--hair); }
/* things to find: one line a row */
.ewm-layer.ewm-layer-find { padding: 4px 2px; }
.ewm-layer .ewm-count { white-space: nowrap; }
/* a long list folds under its row */
.ewm-fold { flex: none; width: 24px; height: 24px; margin: -4px -2px -4px 0; border-radius: 3px; position: relative; cursor: pointer; }
.ewm-fold::after { content: ''; position: absolute; left: 8px; top: 7px; width: 6px; height: 6px; border: solid var(--faint); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .12s; }
.ewm-fold.open::after { transform: rotate(-135deg); top: 10px; }
.ewm-fold:hover { background: var(--raised); }
.ewm-fold:hover::after { border-color: var(--ember-hi); }
.ewm-fold:focus-visible { outline: 1px solid var(--ember); outline-offset: -1px; }
/* the chest tiers: a chip each */
.ewm-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 2px 7px 31px; border-bottom: 1px solid var(--hair); }
.ewm-chips.ewm-chips-flow { padding: 7px 2px 7px 2px; border-bottom: none; }
.ewm-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px 0 3px; border: 1px solid var(--hair); border-radius: 12px; font-size: 12px; color: var(--dim); cursor: pointer; user-select: none; background: #151a11; opacity: .5; }
.ewm-chip .ewm-cell { width: 16px; height: 16px; }
.ewm-chip em { font-style: normal; color: var(--faint); }
.ewm-chip.on { opacity: 1; border-color: rgba(232,144,44,.6); color: var(--text); }
.ewm-chip:hover { border-color: var(--strong); color: var(--text); }
.ewm-chip:focus-visible { outline: 1px solid var(--ember); outline-offset: 1px; }
.ewm-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ore and gems (17-terrain-on-the-map.md): a compact row per kind of find, its ores in two columns, so the open group fits */
.ewm-layer.ewm-layer-find.ewm-layer-kind { padding: 3px 2px; font-size: 12.5px; }
.ewm-layer-kind .ewm-cell { width: 16px; height: 16px; }
.ewm-chips.ewm-chips-ore { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 4px; padding: 1px 0 5px 0; margin-left: -6px; }
.ewm-chips-ore .ewm-chip { height: 20px; min-width: 0; gap: 3px; font-size: 11px; padding: 0 5px 0 2px; }
.ewm-chips-ore .ewm-chip em { margin-left: auto; }

@media (max-width: 900px) {
	.ewm-legend { display: none; }
	.ewm-caption { left: 10px; right: 58px; top: 50px; bottom: auto; transform: none; max-width: none; text-align: left; }
	.ewm-state { gap: 12px; padding: 12px 14px; }
	.ewm-state img { width: 64px; height: 64px; }
	.ewm-layers { width: min(340px, calc(100% - 64px)); max-height: calc(100% - 64px); }
	/* the search takes the top row beside the buttons; the badge goes under it; the card is a sheet at the bottom */
	.ewm-find { right: 58px; width: auto; }
	.ewm-badge { left: 10px; top: 54px; max-width: calc(100% - 78px); }
	.ewm-note { left: 10px; top: 96px; }
	.ewm-caption { top: 96px; }
	.ewm-results { right: 58px; width: auto; }
	.ewm-card { top: auto; bottom: 10px; right: 10px; width: auto; max-height: 64%; padding: 8px 10px 10px; }
	.ewm .ewm-card textarea.ewm-in { min-height: 44px; margin-top: 8px; }
	.ewm-card-lbl { margin: 8px 0 4px; }
}
@media (pointer: coarse) {
	.ewm-zoom button { width: 42px; height: 42px; }
	.ewm-find { height: 42px; }
	.ewm .ewm-find-in, .ewm .ewm-in { font-size: 16px; }
	.ewm .ewm-in { height: 40px; }
	.ewm-results { top: 58px; }
	.ewm-res { padding: 9px 10px; }
	.ewm-btn { height: 40px; }
	.ewm-x { width: 38px; height: 38px; }
	.ewm-iconbtn { height: 42px; }
	.ewm-colorbtn { width: 32px; height: 32px; }
	.ewm-layer { padding: 9px 2px; }
	.ewm-sub-row { padding: 8px 2px 8px 33px; }
	.ewm-tick { padding: 9px 2px 9px 33px; }
	.ewm-group { padding: 10px 2px; }
	.ewm-layer.ewm-layer-find { padding: 7px 2px; }
	.ewm-chip { height: 30px; padding: 0 9px 0 5px; }
	.ewm-fold { width: 32px; height: 32px; margin: -8px -4px -8px 0; }
	.ewm-fold::after { left: 12px; top: 11px; }
	.ewm-fold.open::after { top: 14px; }
}
/* a finger's search box is taller: what sits under it moves down with it */
@media (pointer: coarse) and (min-width: 901px) { .ewm-card { top: 58px; } }
@media (pointer: coarse) and (max-width: 900px) { .ewm-badge { top: 60px; } .ewm-note, .ewm-caption { top: 102px; } }
/* the base picture switch (panel only) on the Layers title's line: the game's map or the decoded ground's Terrain look */
.ewm-sub.ewm-sub-look { display: flex; align-items: center; gap: 8px; margin: 2px 0 3px; }
.ewm-look { display: inline-flex; gap: 4px; margin-left: auto; text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 400; }
.ewm-chip.ewm-look-opt { height: 20px; padding: 0 8px; font-size: 11.5px; }
