/* Hearth GM combat mode v2e restyled to v2d (Tom 13 Nov, test branch private-test/gm-v2d). The v5 player look: deep navy-black panes, warm ink, gold.
   Stacked: map on top (42% of the height), the pane under it. Wide: the pane is a side panel (left on a laptop). */
.gmx {
  --x-bg: var(--c-night-07-b); --x-pane: var(--c-night-09); --x-card: var(--c-night-11); --x-card2: var(--c-night-14); --x-line: var(--c-night-20); --x-ink: var(--c-ink-88); --x-meta: var(--c-gold-61);
  --x-gold: var(--c-gold-65); --x-gold2: var(--c-gold-76-b); --x-goldd: var(--c-gold-47-b); --x-red: var(--c-red-44); --x-red2: var(--c-red-54-b); --x-blue: var(--c-blue-72);
  --x-row: 52px; --x-mid: 26px; --x-strip: 60px; --x-maph: 42vh;
  background: var(--x-bg);
}
.gmx .gmx-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.gmx .gmx-split, .gmx .gmx-splitrow { display: contents; }
.gmx .gmx-stage { position: relative; flex: 0 0 var(--x-maph); min-height: 0; overflow: hidden; border-bottom: 1px solid var(--c-umber-18); }
.gmx.gmx-wide .gmx-body { flex-direction: row; }
.gmx.gmx-wide .gmx-stage { flex: 1 1 auto; border-bottom: 0; }
.gmx.gmx-wide .gmx-pane { flex: 0 0 var(--gmx-pw, 380px); width: var(--gmx-pw, 380px); border-left: 1px solid var(--c-umber-18); }
.gmx.gmx-wide.gmx-left .gmx-pane { order: -1; border-left: 0; border-right: 1px solid var(--c-umber-18); }
/* (v2d) the stacked map's height comes from gm-v2e.js (--x-maph, the v2d table: phone 380, Fold 8 cover 300, Fold 4 open 360, old Fold open 470) */

/* ---- nothing on the map: the board's floating furniture stays off in this layout ---- */
.gmx .gm2-wheel, .gmx .gm2-tabs, .gmx .gm2-float, .gmx .gm2-areas, .gmx .mi-afan, .gmx .mi-hint, .gmx .mi-aftogs,
.gmx .gm2-dring, .gmx .gmx-stage .los-panel, .gmx .mi-fbar, .gmx .mi-fmore, .gmx .mi-hist, .gmx .gmx-stage .mi-pview, .gmx .gm2-tplbanner,
.gmx .gmx-stage .gm2-tplpanel, .gmx .gmx-stage .gm2-aoeplace, .gmx .gmx-stage .gm2-snapbar, .gmx .gmx-stage .gm2-end, .gmx .mi-offbox,
.gmx .gmx-stage .gm2-note, .gmx .gmx-stage .gm2-aoechip { display: none !important; }
body > .los-panel { display: none !important; }
.gmx .gmx-pane .los-panel { position: static !important; inset: auto !important; transform: none !important; width: auto !important; max-width: none !important; max-height: none !important; box-shadow: none !important; margin: 0 !important; display: block !important; }

/* the exit tab: the only control on the map */
.gmx .gmx-exit { position: absolute; top: calc(6px + var(--hearth-safe-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 30; width: 56px; height: 26px; min-height: 26px;
  border-radius: 0 0 14px 14px; border: 1px solid var(--c-umber-28); border-top: 0; background: rgb(from var(--c-night-07-b) r g b / 0.88); color: var(--x-gold); display: flex; align-items: center; justify-content: center; padding: 0; }
.gmx .gmx-exit::before { content: ""; position: absolute; inset: -10px -4px; } /* 44 px tall to the finger */
.gmx.gmx-wide .gmx-exit { top: 0; }

/* ---- the pane ---- */
.gmx .gmx-pane { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; min-width: 0; background: var(--x-pane); color: var(--x-ink);
  padding-bottom: var(--hearth-safe-bottom, 0px); font: 14px/1.3 Roboto, "Source Sans 3", system-ui, sans-serif; }
.gmx .gmx-pane h2 { font: 600 18px/1.15 "Cormorant Garamond", Georgia, serif; margin: 0; color: var(--x-ink); }
.gmx .gmx-row { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: var(--x-row); border-bottom: 1px solid var(--x-line); overflow: hidden; }
.gmx .gmx-rb { position: relative; flex: none; width: 52px; min-width: 48px; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); padding: 0; }
.gmx .gmx-rb span { font: 600 10.5px/1 Roboto, system-ui, sans-serif; white-space: nowrap; }
.gmx .gmx-rb svg { color: var(--x-gold); }
.gmx .gmx-rb.on { background: linear-gradient(var(--oak-brass-hi), var(--c-gold-52-b)); border-color: var(--c-gold-79); color: var(--c-umber-07); }
.gmx .gmx-rb.on svg { color: var(--c-umber-07); }
.gmx .gmx-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--x-gold); color: var(--c-umber-07); font: 700 11px/18px Roboto, sans-serif; text-align: center; font-style: normal; box-shadow: 0 0 0 2px var(--x-pane); }
.gmx .gmx-rb.on .gmx-badge { background: var(--c-umber-07); color: var(--x-gold); }
.gmx .gmx-chips { flex: 1 1 auto; min-width: 0; display: flex; gap: 6px; justify-content: flex-start; flex-wrap: nowrap; overflow: hidden; }
.gmx .gmx-on { flex: none; height: 32px; min-height: 32px; padding: 0 10px; border-radius: 16px; border: 1px solid var(--c-umber-28); background: var(--c-night-09-b); color: var(--x-gold2); font: 600 12px/1 Roboto, sans-serif; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; position: relative; }
.gmx .gmx-on::before { content: ""; position: absolute; inset: -6px -2px; }
.gmx .gmx-on i { font-style: normal; background: var(--x-gold); color: var(--c-umber-07); border-radius: 9px; padding: 1px 6px; font-size: 11px; }
.gmx .gmx-on.sel { background: linear-gradient(var(--oak-brass-hi), var(--c-gold-52-b)); color: var(--c-umber-07); border-color: var(--c-gold-79); }
.gmx .gmx-on.sel i { background: var(--c-umber-07); color: var(--x-gold); }
.gmx .gmx-on svg { width: 14px; height: 14px; }
.gmx .gmx-spellchip { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

.gmx .gmx-mid { flex: none; height: var(--x-mid); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; color: var(--x-gold2); font: 600 12.5px/1 Roboto, sans-serif;
  border-bottom: 1px solid var(--x-line); white-space: nowrap; overflow: hidden; }
.gmx .gmx-mid span { overflow: hidden; text-overflow: ellipsis; }
.gmx .gmx-dia { width: 8px; height: 8px; background: var(--x-gold); transform: rotate(45deg); flex: none; }
.gmx .gmx-extra { flex: none; padding: 6px 8px 0; display: flex; flex-direction: column; gap: 6px; }
.gmx .gmx-extra .gm2-snapbar, .gmx .gmx-extra .gm2-end { position: static !important; transform: none !important; inset: auto !important; margin: 0 !important; width: auto !important; max-width: none !important; box-shadow: none !important; }
.gmx .gmx-lower { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* initiative faces */
.gmx .gmx-faces { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--x-line); }
.gmx .gmx-rdwrap { flex: none; }
.gmx .gmx-rd { width: 44px; height: 48px; min-height: 44px; border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; gap: 0; }
.gmx .gmx-rd small { font: 700 9px/1 Roboto, sans-serif; letter-spacing: .08em; color: var(--x-meta); }
.gmx .gmx-rd b { font: 700 18px/1 Roboto, sans-serif; }
.gmx .gmx-rd svg { width: 12px; height: 12px; color: var(--x-gold); }
.gmx .gmx-facescroll { flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 6px; }
.gmx .gmx-facescroll::-webkit-scrollbar { display: none; }
.gmx .gmx-face { position: relative; flex: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; border-radius: 50%; }
.gmx .gmx-face .ring { position: absolute; inset: 2px; border-radius: 50%; overflow: hidden; border: 2px solid var(--c-red-44); background: var(--c-night-13-b); display: flex; align-items: center; justify-content: center; }
.gmx .gmx-face.pc .ring { border-color: var(--c-blue-72); }
.gmx .gmx-face .ring img { width: 100%; height: 100%; object-fit: cover; }
.gmx .gmx-face .ring .ini-face { font: 700 13px/1 Roboto, sans-serif; color: var(--x-ink); }
.gmx .gmx-face em { position: absolute; right: -2px; bottom: -3px; min-width: 17px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--c-night-07-b); border: 1px solid var(--c-umber-24-b); color: var(--x-ink); font: 700 10px/13px Roboto, sans-serif; font-style: normal; text-align: center; }
.gmx .gmx-face.turn .ring { border: 3px solid var(--x-gold); box-shadow: 0 0 0 2px rgb(from var(--c-gold-65) r g b / 0.35), 0 0 12px rgb(from var(--c-gold-65) r g b / 0.45); }
.gmx .gmx-face.sel:not(.turn) .ring { border-color: var(--c-ink-88); box-shadow: 0 0 0 2px rgb(from var(--c-ink-88) r g b / 0.35); }
.gmx .gmx-face.down .ring { filter: grayscale(1) brightness(.6); }
.gmx .gmx-face.hid .ring { border-style: dashed; opacity: .75; }

/* the mini card */
.gmx .gmx-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.gmx .gmx-chead { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px 6px; }
.gmx .gmx-cname { flex: 1 1 120px; min-width: 0; }
.gmx .gmx-cname b { display: block; font: 600 16px/1.15 "Cormorant Garamond", Georgia, serif; color: var(--x-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmx .gmx-cname small { color: var(--x-meta); font-size: 12px; }
.gmx .gmx-cchips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; order: 3; flex: 1 1 100%; }
.gmx .gmx-cchips .gmx-more { margin-left: auto; width: 44px; height: 44px; }
.gmx .gmx-hp { flex: none; display: flex; align-items: center; gap: 6px; }
.gmx .gmx-hpb { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); font: 600 20px/1 Roboto, sans-serif; padding: 0; }
.gmx .gmx-hpv { min-width: 72px; height: 44px; border-radius: 10px; border: 1px solid var(--c-red-59); background: linear-gradient(var(--c-red-47-c), var(--c-red-35)); color: var(--c-white); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 8px; gap: 1px; }
.gmx .gmx-hpv small { font: 700 9px/1 Roboto, sans-serif; letter-spacing: .08em; opacity: .85; }
.gmx .gmx-hpv b { font: 700 16px/1 Roboto, sans-serif; }
.gmx .gmx-hpset { width: 86px; height: 44px; }
.gmx .gmx-more { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); font: 700 18px/1 Roboto, sans-serif; padding: 0; flex: none; }
.gmx .gmx-chip { position: relative; min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); font: 600 12.5px/1 Roboto, sans-serif; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.gmx .gmx-chip::before { content: ""; position: absolute; inset: -6px -2px; }
.gmx .gmx-chip.on { border-color: var(--c-umber-28); background: var(--c-umber-13-b); color: var(--x-gold2); }
.gmx .gmx-chip.add { border-style: dashed; color: var(--x-gold2); }
.gmx .gmx-chip.hit { border-color: var(--c-red-59); color: var(--c-red-85); min-height: 44px; }
.gmx .gmx-chip.done { background: linear-gradient(var(--oak-brass-hi), var(--c-gold-52-b)); color: var(--c-umber-07); border-color: var(--c-gold-79); }
.gmx .gmx-chip .sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.gmx .gmx-line { flex: none; margin: 0 10px 6px; min-height: 44px; border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-gold2); font: 600 13px/1 Roboto, sans-serif; }
.gmx .gmx-ds { display: flex; align-items: center; gap: 8px; padding: 0 10px 6px; }
.gmx .gmx-ds button { min-height: 44px; flex: 1; border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); }
.gmx .gmx-condpick { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 8px; max-height: 40%; overflow: auto; border-bottom: 1px solid var(--x-line); }
.gmx .gmx-tabs { flex: none; display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--x-line); }
.gmx .gmx-tab { flex: 1 1 0; min-height: 44px; border: 0; background: none; color: var(--x-meta); font: 600 13px/1 Roboto, sans-serif; border-radius: 10px 10px 0 0; }
.gmx .gmx-tab.on { color: var(--x-gold2); background: var(--c-umber-13-b); box-shadow: inset 0 -2px 0 var(--x-gold); }
.gmx .gmx-cbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 10px; }
.gmx .gmx-sec { font: 700 11px/1 Roboto, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--x-gold); margin: 8px 2px 6px; }
.gmx .gmx-sec small { letter-spacing: 0; text-transform: none; color: var(--x-meta); font-weight: 500; margin-left: 4px; }
.gmx .gmx-act { display: flex; align-items: center; gap: 10px; padding: 6px 8px; min-height: 52px; border-radius: 10px; border: 1px solid var(--x-line); background: var(--x-card); margin-bottom: 6px; cursor: pointer; }
.gmx .gmx-act.on { border-color: var(--x-gold); background: linear-gradient(90deg, var(--c-umber-12), var(--c-night-09-c)); box-shadow: inset 3px 0 0 var(--x-gold); }
.gmx .gmx-act .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c-ink-88); flex: none; }
.gmx .gmx-act .grow { flex: 1 1 auto; min-width: 0; }
.gmx .gmx-act b { display: block; font: 600 14.5px/1.2 Roboto, sans-serif; }
.gmx .gmx-act small { display: block; color: var(--x-meta); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmx .gmx-std { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.gmx .gmx-note { color: var(--x-meta); font-size: 13px; margin: 8px 4px; }
.gmx .gmx-empty { align-items: center; justify-content: center; }
.gmx .gmx-stat .gm2-card { padding: 0 !important; background: none !important; }
.gmx .gmx-stat .gm2-card > .gm2-hpbar, .gmx .gmx-stat .gm2-card > .gm2-hpchips, .gmx .gmx-stat .gm2-card > .gm2-setturn, .gmx .gmx-stat .gm2-foot { display: none !important; }

/* the strip */
.gmx .gmx-strip { flex: none; display: flex; gap: 6px; padding: 4px 8px; border-top: 1px solid var(--x-line); background: var(--c-night-07); }
.gmx .gmx-strip > button { min-height: 44px; height: 44px; border-radius: 12px; }
.gmx .gmx-shp { flex: 0 0 66px; border: 1px solid var(--c-red-59); background: linear-gradient(var(--c-red-47-c), var(--c-red-35)); color: var(--c-white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; }
.gmx .gmx-shp small { font: 700 9px/1 Roboto, sans-serif; letter-spacing: .08em; opacity: .85; }
.gmx .gmx-shp b { font: 700 14px/1 Roboto, sans-serif; }
.gmx .gmx-sinit { flex: 0 0 48px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; }
.gmx .gmx-sinit small { font: 600 10px/1 Roboto, sans-serif; }
.gmx .gmx-sinit svg { width: 18px; height: 18px; color: var(--x-gold); }
.gmx .gmx-sinit.on { background: var(--c-umber-13-b); border-color: var(--x-gold); }
.gmx .gmx-go { flex: 1 1 auto; border: 1px solid var(--c-umber-28); background: linear-gradient(var(--c-gold-34), var(--c-umber-25-b)); color: rgb(from var(--c-umber-07) r g b / 0.75); font: 700 16px/1 Roboto, sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; opacity: .85; }
.gmx .gmx-go.ready { background: linear-gradient(var(--c-gold-76-b), var(--c-gold-52-b)); color: var(--c-umber-07); border-color: var(--c-gold-79); opacity: 1; box-shadow: 0 0 14px rgb(from var(--c-gold-65) r g b / 0.35); }
.gmx .gmx-go svg { width: 18px; height: 18px; }
.gmx .gmx-next { flex: 0 0 auto; min-width: 92px; padding: 0 12px; border: 1px solid var(--c-gold-52-b); background: var(--c-umber-13-b); color: var(--x-gold2); font: 700 14px/1 Roboto, sans-serif; white-space: nowrap; }

/* ---- tool panels (in place of the card) ---- */
.gmx .gmx-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.gmx .gmx-ph { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--x-line); flex-wrap: wrap; }
.gmx .gmx-ph .grow { flex: 1 1 120px; min-width: 0; }
.gmx .gmx-ph small { display: block; color: var(--x-meta); font-size: 11.5px; margin-top: 2px; }
.gmx .gmx-done { min-height: 44px; min-width: 64px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--c-gold-79); background: linear-gradient(var(--c-gold-76-b), var(--c-gold-52-b)); color: var(--c-umber-07); font: 700 14px/1 Roboto, sans-serif; }
.gmx .gmx-pbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px 12px; }
.gmx .gmx-search { flex: 1 1 140px; display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-meta); min-width: 0; }
.gmx .gmx-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--x-ink); font: 14px Roboto, sans-serif; }
.gmx .gmx-search svg { width: 16px; height: 16px; flex: none; }
.gmx .gmx-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.gmx.gmx-wide .gmx-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gmx .gmx-tile { position: relative; min-height: 58px; padding: 6px 2px; border-radius: 12px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.gmx .gmx-tile span { font: 600 11px/1.15 Roboto, sans-serif; text-align: center; }
.gmx .gmx-tile svg { color: var(--x-gold); }
.gmx .gmx-tile.on { border-color: var(--x-gold); background: var(--c-umber-13-b); }
.gmx .gmx-onb { position: absolute; top: -5px; right: -3px; padding: 1px 5px; border-radius: 8px; background: var(--x-gold); color: var(--c-umber-07); font: 700 9.5px/1.3 Roboto, sans-serif; font-style: normal; }
.gmx .gmx-gh { font: 700 11px/1 Roboto, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--x-gold); margin: 10px 2px 6px; }
.gmx .gmx-gh:first-child { margin-top: 2px; }
.gmx .gmx-segs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.gmx .gmx-seg { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 Roboto, sans-serif; }
.gmx .gmx-seg svg { width: 16px; height: 16px; color: var(--x-gold); }
.gmx .gmx-seg.on { background: linear-gradient(var(--c-gold-76-b), var(--c-gold-52-b)); color: var(--c-umber-07); border-color: var(--c-gold-79); }
.gmx .gmx-seg.on svg { color: var(--c-umber-07); }
.gmx .gmx-size { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 6px; color: var(--x-meta); font-size: 12px; }
.gmx .gmx-size input { flex: 1; accent-color: var(--c-gold-65); height: 44px; }
.gmx .gmx-size b { color: var(--x-ink); font-weight: 600; min-width: 40px; text-align: right; }
.gmx .gmx-size.dim { opacity: .5; }
.gmx .gmx-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.gmx .gmx-b { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); font: 600 13px/1 Roboto, sans-serif; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.gmx .gmx-b svg { width: 16px; height: 16px; }
.gmx .gmx-b.gold { background: linear-gradient(var(--c-gold-76-b), var(--c-gold-52-b)); color: var(--c-umber-07); border-color: var(--c-gold-79); }
.gmx .gmx-b.warn { border-color: var(--c-red-59); color: var(--c-red-85); }
.gmx .gmx-b:disabled { opacity: .45; }
.gmx .gmx-onoff { min-height: 44px; min-width: 56px; border-radius: 22px; border: 1px solid var(--c-umber-28); background: var(--c-night-09-b); color: var(--x-meta); font: 700 13px/1 Roboto, sans-serif; }
.gmx .gmx-onoff.on { background: linear-gradient(var(--c-gold-76-b), var(--c-gold-52-b)); color: var(--c-umber-07); border-color: var(--c-gold-79); }
.gmx .gmx-hist { display: flex; flex-wrap: wrap; gap: 6px; }
.gmx .gmx-hi { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-ink); font-size: 12.5px; }
.gmx .gmx-hi.on { border-color: var(--x-gold); }
.gmx .gmx-hi.undone { opacity: .5; }
.gmx .gmx-lrow { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--x-line); background: var(--x-card); color: var(--x-ink); margin-bottom: 6px; text-align: left; }
.gmx .gmx-lrow .grow { flex: 1 1 auto; min-width: 0; }
.gmx .gmx-lrow b { display: block; font: 600 14px/1.2 Roboto, sans-serif; }
.gmx .gmx-lrow small { display: block; color: var(--x-meta); font-size: 12px; }
.gmx .gmx-lrow.on { border-color: var(--x-gold); }
.gmx .gmx-lrow .gm2-face { width: 36px; height: 36px; flex: none; }
.gmx .gmx-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.gmx .gmx-menu > * { min-height: 48px; }
.gmx .gmx-wideb { width: 100%; margin-bottom: 8px; min-height: 48px; }
.gmx .gmx-init .gm2-irow { width: 100%; margin-bottom: 4px; }
.gmx .gmx-board { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; position: static !important; max-height: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: var(--x-pane) !important; }
.gmx .gmx-board > .gm2-sheet-h { position: sticky; top: 0; z-index: 2; background: var(--x-pane); }
.gmx .gmx-keys kbd { display: inline-block; min-width: 18px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--c-umber-24-b); color: var(--x-ink); font: 600 11px/1.3 Roboto, sans-serif; text-align: center; }
.gmx .gmx-confirm { position: static !important; transform: none !important; margin: 10px 0 0 !important; }
.gmx .gmx-los .los-switch, .gmx .gmx-los .los-row { min-height: 44px; }

/* AoE */
.gmx .gmx-spells { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.gmx .gmx-spells.free { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gmx .gmx-spell { min-height: 52px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--c-umber-28); background: var(--c-night-09-b); color: var(--x-ink); display: flex; align-items: center; gap: 8px; text-align: left; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.gmx .gmx-spell svg { color: var(--x-gold); flex: none; }
.gmx .gmx-spell b { display: block; font: 600 13.5px/1.15 Roboto, sans-serif; }
.gmx .gmx-spell small { display: block; color: var(--x-meta); font-size: 11.5px; }
.gmx .gmx-spells.free .gmx-spell { justify-content: center; text-align: center; }
.gmx .gmx-secret { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px dashed var(--x-gold); color: var(--x-gold2); font-size: 13px; margin: 0 0 8px; }
.gmx .gmx-aoechips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.gmx .gmx-aoechips .gmx-chip { min-height: 36px; }
.gmx .gmx-aoe .gm2-tplpanel { position: static !important; inset: auto !important; transform: none !important; width: auto !important; max-width: none !important; max-height: none !important; margin: 0 !important; box-shadow: none !important; display: block !important; background: transparent !important; border: 0 !important; padding: 0 !important; }
.gmx .gmx-aoe .gm2-tplacts { position: static !important; }
.gmx .gmx-aoe .gm2-tplacts button { min-height: 44px; }
.gmx .gmx-aoe .gm2-dialbtn, .gmx .gmx-aoe .gm2-tplfoot { display: none !important; }
.gmx .gmx-aoe .gm2-caughtlist { max-height: none !important; }
/* (253.1 fix-back, Tom 16 Nov 05:38) the AoE is placed the 252 way: the map tools' own handles (move, turn, resize)
   show on the area being placed and on the selected one. Sizes and gaps from the root tokens. */
.gmx .gmx-aoeacts { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.gmx .gmx-aoeacts > .gmx-b { flex: 1 1 0%; justify-content: center; min-height: var(--tap); }
.gmx .gmx-arealist { display: flex; flex-direction: column; gap: var(--sp-2); }
.gmx .gmx-arearow { display: flex; gap: var(--sp-2); align-items: stretch; }
.gmx .gmx-arearow > .grow { flex: 1 1 0%; min-width: 0; justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; }

/* the shut Fold 4: unfold card */
.gmx-unfold { position: fixed; inset: 0; z-index: 9000; background: rgb(from var(--c-night-04) r g b / 0.82); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gmx-unfold .gmx-ucard { max-width: 280px; width: 100%; background: var(--c-night-09); border: 1px solid var(--c-umber-21); border-radius: 18px; padding: 22px 18px 16px; text-align: center; color: var(--c-ink-88); box-shadow: 0 18px 40px rgb(from var(--c-black) r g b / 0.6); }
.gmx-unfold h2 { font: 600 20px/1.2 "Cormorant Garamond", Georgia, serif; margin: 10px 0 6px; color: var(--c-gold-76-b); }
.gmx-unfold p { margin: 0 0 4px; font: 14px/1.35 Roboto, sans-serif; }
.gmx-unfold small { display: block; color: var(--c-gold-61); font: 12px/1.35 Roboto, sans-serif; margin-bottom: 12px; }
.gmx-unfold .gmx-anyway { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: none; color: var(--c-gold-65); font: 600 13px/1 Roboto, sans-serif; text-decoration: underline; }

/* the 252 board, while the GM has stepped out of the fight layout */
.gm2 .gmx-backbar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 40; min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--c-gold-79);
  background: linear-gradient(var(--c-gold-76-b), var(--c-gold-52-b)); color: var(--c-umber-07); font: 700 14px/1 Roboto, sans-serif; box-shadow: 0 8px 22px rgb(from var(--c-black) r g b / 0.5); }

/* the app-wide "pressed button" rule ([aria-pressed="true"], !important) would paint these dark: ours win */
html:root[data-palette][data-palette][data-palette] body .gmx :is(.gmx-rb.on, .gmx-seg.on, .gmx-onoff.on, .gmx-b.gold, .gmx-on.sel, .gmx-done, .gmx-chip.done)[class] {
  background: linear-gradient(var(--c-gold-76-b), var(--c-gold-52-b)) !important; color: var(--c-umber-07) !important; border-color: var(--c-gold-79) !important; }
html:root[data-palette][data-palette][data-palette] body .gmx :is(.gmx-rb.on, .gmx-seg.on) svg { color: var(--c-umber-07) !important; }
html:root[data-palette][data-palette][data-palette] body .gmx :is(.gmx-chip.on, .gmx-tile.on, .gmx-lrow.on)[class] { background: var(--c-umber-13-b) !important; color: var(--c-gold-76-b) !important; border-color: var(--c-gold-47-b) !important; }
html:root[data-palette][data-palette][data-palette] body .gmx .gmx-tab.on[class] { background: var(--c-umber-13-b) !important; color: var(--c-gold-76-b) !important; }
/* the selected area's big label would sit on the map: its words are in the panel */
.gmx .mi-chip.big { display: none !important; }
/* the board's area panel: its Cancel and Apply are ours (Remove in the head, Apply on the gold button) */
.gmx .gmx-aoe [data-gm2-tpl-cancel], .gmx .gmx-aoe .gm2-apply { display: none !important; }

/* panel heads stay on one line: title, (search), Done */
.gmx .gmx-ph { flex-wrap: nowrap; }
.gmx .gmx-ph .grow { flex: 1 1 auto; }
.gmx .gmx-ph .gmx-search { flex: 1 1 120px; max-width: 220px; }
/* (12F) a rule for a .gmx-search box in a panel header went here; no screen draws one any more, and the :has() it
   used cost every change on the GM screen a page-wide restyle */
@media (max-height: 560px) {
  .gmx { --x-row: 48px; --x-mid: 22px; --x-strip: 54px; }
  .gmx .gmx-tile { min-height: 50px; padding: 4px 2px; }
  .gmx .gmx-strip > button { min-height: 44px; }
  .gmx .gmx-ph { padding: 6px 8px; }
  .gmx .gmx-ph h2 { font-size: 16px; }
}
.gmx .gmx-chips > :first-child { margin-left: auto; }
.gmx .gmx-spellchip { flex: 0 1 auto; min-width: 0; }
.gmx .gmx-row .gmx-spellchip { min-height: var(--tap); }
.gmx .gmx-row .gmx-spellchip::before { content: none; } /* (fix-back) it clips its long name with an ellipsis, so it is --tap tall itself (rule 8) */
.gmx .gmx-aoechips .gmx-chip svg { width: 14px; height: 14px; }
.gmx .gmx-go span { line-height: 1.05; text-align: center; }
.gmx .gmx-pview { position: static !important; inset: auto !important; width: 100% !important; max-width: none !important; margin: 0 0 8px !important; box-shadow: none !important; }
.gmx .gmx-pview .mi-pvmap { width: 100%; border-radius: 10px; overflow: hidden; background-size: cover; }
.gmx .gmx-modes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 6px; }
.gmx .gmx-modes button { min-height: 44px; }
/* the board's own small link-style buttons (game file rows and the like) get a full finger target in the pane */
.gmx .gmx-pbody button, .gmx .gmx-board button { min-height: 44px; }
/* the Sight panel's player row wraps in the pane (it ran past the edge on a phone) */
.gmx .gmx-los .los-list { display: flex !important; flex-wrap: wrap !important; overflow: visible !important; gap: 6px; }
.gmx .gmx-los .los-row { flex: 0 1 auto; max-width: 100%; }
.gmx .gmx-los .los-legend { flex-wrap: wrap; }

/* ================= v2d (Tom picked 13 Nov 17:07; widths 17:15; width/side setting 18:58) ================= */
/* the exit tab: Home and Settings slide down from it, the same as the player combat look; tap again to tuck them */
.gmx .gmx-exitwrap { position: absolute; left: 0; right: 0; top: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.gmx .gmx-exitwrap > * { pointer-events: auto; }
.gmx .gmx-exitwrap .gmx-exit { position: relative; top: auto; left: auto; transform: none; margin-top: calc(6px + var(--hearth-safe-top, 0px)); }
.gmx.gmx-wide .gmx-exitwrap .gmx-exit { margin-top: 0; }
.gmx .gmx-exitwrap.open .gmx-exit { margin-top: 0; }
.gmx .gmx-exit svg { transition: transform .18s; }
.gmx .gmx-exit.open svg { transform: rotate(180deg); }
.gmx .gmx-exitbar { display: flex; gap: 8px; width: 100%; padding: calc(8px + var(--hearth-safe-top, 0px)) 10px 8px; background: rgb(from var(--c-night-07) r g b / 0.94); border-bottom: 1px solid var(--c-umber-18); }
.gmx .gmx-exitbar button { min-height: 44px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 Roboto, system-ui, sans-serif; }
.gmx .gmx-exitbar svg { width: 18px; height: 18px; }
.gmx .gmx-home { border: 1px solid var(--c-gold-79); background: linear-gradient(var(--c-gold-76-b), var(--c-gold-57)); color: var(--c-umber-07); }
.gmx .gmx-set { border: 1px solid var(--c-gold-47-b); background: var(--c-night-07); color: var(--x-ink); }
html:root[data-palette][data-palette][data-palette] body .gmx .gmx-home[class] { background: linear-gradient(var(--c-gold-76-b), var(--c-gold-57)) !important; color: var(--c-umber-07) !important; border-color: var(--c-gold-79) !important; }
@media (prefers-reduced-motion: reduce) { .gmx .gmx-exit svg { transition: none; } }

/* wide: the mid strip is the top line of the side panel; the row wraps its ON chips to a second line when tight */
.gmx.gmx-wide .gmx-mid { border-bottom: 1px solid var(--x-line); }
.gmx.gmx-wide .gmx-row { flex-wrap: wrap; row-gap: 8px; }
.gmx.gmx-wide .gmx-chips { flex-wrap: wrap; }
/* wide with room (laptop, a third-width panel): row buttons are icon + word side by side, as in the v2d mocks */
.gmx:not(.gmx-compact) .gmx-rb { width: auto; min-width: 44px; height: 44px; flex-direction: row; gap: 6px; padding: 0 10px; }
.gmx:not(.gmx-compact) .gmx-rb span { font: 600 14px/1 Roboto, system-ui, sans-serif; }
.gmx:not(.gmx-compact) .gmx-rb svg { width: 18px; height: 18px; }
/* the quarter-width Fold panel (240-299 dp): condense, never widen. Taps stay 44 dp, text at least 12 */
.gmx.gmx-narrow .gmx-row { gap: 6px; padding: 6px 8px; }
.gmx.gmx-narrow .gmx-rb { width: 50px; min-width: 44px; }
.gmx.gmx-narrow .gmx-mid { font-size: 12px; padding: 0 8px; }
.gmx.gmx-narrow .gmx-cname { flex: 1 1 100%; }
.gmx.gmx-narrow .gmx-hp { flex: 1 1 100%; justify-content: flex-start; }
.gmx.gmx-narrow .gmx-hpv { flex: 1 1 auto; }
.gmx.gmx-narrow .gmx-tabs { padding: 0 4px; }
.gmx.gmx-narrow .gmx-tab { font-size: 12px; padding: 0 2px; line-height: 1.1; }
/* Tom 13 Nov 20:46: the strip is ~52 dp on one row everywhere, quarter-width Fold panels too */
.gmx.gmx-narrow .gmx-strip { flex-wrap: nowrap; gap: 4px; padding: 4px 6px; }
.gmx.gmx-narrow .gmx-strip .gmx-shp { flex: 0 0 48px; }
.gmx.gmx-narrow .gmx-strip .gmx-sinit { flex: 0 0 44px; }
.gmx.gmx-narrow .gmx-strip .gmx-go { flex: 1 1 0; min-width: 0; padding: 0 4px; font-size: 13px; gap: 4px; }
.gmx.gmx-narrow .gmx-strip .gmx-go svg { display: none; }
.gmx.gmx-narrow .gmx-strip .gmx-next { flex: 0 0 64px; min-width: 0; padding: 0 4px; font-size: 13px; line-height: 1.1; white-space: normal; text-align: center; }
.gmx.gmx-narrow .gmx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gmx.gmx-narrow .gmx-ph { flex-wrap: wrap; }
.gmx.gmx-narrow .gmx-ph .gmx-search { flex: 1 1 100%; max-width: none; order: 3; }
.gmx.gmx-narrow .gmx-spells { grid-template-columns: 1fr; }
.gmx.gmx-narrow .gmx-spells.free { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gmx.gmx-narrow .gmx-menu { grid-template-columns: 1fr; }
.gmx.gmx-narrow .gmx-act small { white-space: normal; }
/* a medium side panel (300-359 dp): five tiles were tight */
.gmx.gmx-wide.gmx-compact:not(.gmx-narrow) .gmx-tiles, .gmx.gmx-wide .gmx-tiles { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
/* the all-sections view (wide and tall): empty sections as quiet boxes, as in the v2d laptop / Fold open frames */
.gmx .gmx-none { margin: 0 0 6px; padding: 12px 12px; border-radius: 10px; border: 1px solid var(--x-line); background: var(--x-card); color: var(--x-meta); font-size: 13px; }
.gmx .gmx-foot { margin-top: 10px; }
/* the AoE panel: its option chips are one sideways line, so the saves get the room (v2d fix 3, the Fold 8 cover) */
/* (253.1 fix-back rule 2) the area's chips wrap inside the panel (the shared .r-chip-row); no sideways scroll, no cut chip */

/* the card head (v2d): name, Hidden, + Condition, then − HP + on one line where it fits (440 dp and up);
   narrower, the chips drop to a second line. ⋯ sits at the end of the tabs (beside the name on the narrow Fold panel) */
.gmx .gmx-card { container: gmxcard / inline-size; }
.gmx .gmx-chead { flex-wrap: wrap; }
.gmx .gmx-cname { order: 1; flex: 1 1 90px; }
.gmx .gmx-cchips { order: 3; flex: 1 1 100%; }
.gmx .gmx-hp { order: 2; }
.gmx .gmx-more-h { order: 2; display: none; }
.gmx .gmx-tabs .gmx-more-t { flex: 0 0 44px; height: 44px; align-self: center; margin-left: 2px; border-radius: 10px; }
@container gmxcard (min-width: 440px) {
  .gmx .gmx-chead { flex-wrap: nowrap; }
  .gmx .gmx-cname { flex: 1 1 auto; }
  .gmx .gmx-cchips { order: 2; flex: 0 1 auto; flex-wrap: nowrap; }
  .gmx .gmx-hp { order: 3; }
}
.gmx.gmx-narrow .gmx-more-h { display: inline-flex; align-items: center; justify-content: center; }
.gmx.gmx-narrow .gmx-tabs .gmx-more-t { display: none; }
.gmx.gmx-narrow .gmx-cname { flex: 1 1 0; order: 1; }
.gmx.gmx-narrow .gmx-hp { order: 3; }
@container gmxcard (min-width: 440px) {
  .gmx .gmx-cname { flex: 1 0 96px; min-width: 96px; }
  .gmx .gmx-cchips { min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 6px 2px; margin: -6px 0; }
  .gmx .gmx-cchips::-webkit-scrollbar { display: none; }
  .gmx .gmx-cchips > * { flex: none; }
}
/* the board's area panel inside our pane: never wider than the pane (it kept a 320 px minimum on the quarter Fold panel) */
.gmx .gmx-aoe .gm2-tplpanel { min-width: 0 !important; box-sizing: border-box !important; overflow: visible !important; } /* the panel body is the one scroller (it was a second, 2 px one inside it on a phone on its side) */
.gmx .gmx-aoe .gm2-tplhead { flex-wrap: wrap !important; min-width: 0 !important; row-gap: 8px; }
.gmx .gmx-aoe .gm2-tplhead > .grow { min-width: 0; flex: 1 1 120px; }
.gmx .gmx-aoe .gm2-caughtlist { min-width: 0 !important; }
.gmx .gmx-aoe .gm2-tplacts { flex-wrap: wrap !important; min-width: 0 !important; }
.gmx.gmx-narrow .gmx-aoe .gm2-caughtlist { grid-template-columns: minmax(0, 1fr) !important; }
.gmx.gmx-narrow .gmx-aoe .gm2-caught { min-width: 0; }
.gmx.gmx-narrow .gmx-aoe .gm2-tplhead .gm2-dmgfield, .gmx.gmx-narrow .gmx-aoe .gm2-tplhead .gm2-dcchip { flex: 1 1 100%; }
/* the saves first: who is caught and how they rolled, then the damage and save settings (v2d fix 3: usable saves) */
.gmx .gmx-aoe .gm2-tplpanel { display: flex !important; flex-direction: column; gap: 8px; }
.gmx .gmx-aoe .gm2-caughtlist { order: 1; }
.gmx .gmx-aoe .gm2-tplhead { order: 2; }
.gmx .gmx-aoe .gm2-tplacts { order: 3; }
/* short side panels (the Fold 8 cover on its side): the row's spell chip goes (the gold AoE button and the panel say it) */
@media (max-height: 560px) { .gmx.gmx-wide .gmx-row .gmx-spellchip { display: none; } }
/* Tom 13 Nov 20:46: while an area waits to be placed (or a placed one is dragged) the map is locked. No pan, no zoom. */
body.gmx-maplock #dmMapScroll, body.gmx-maplock #dmMapScroll * { touch-action: none !important; overscroll-behavior: none !important; }
/* GM fog (Tom 13 Nov 20:46): the v2d mock's darker see-through fog. The old square-by-square fog layer is not drawn
   under the soft one, and the grid lines sit under the fog, so the fogged part shows soft lines, not harsh ones. */
.gmx #dmFogLayer { display: none !important; }
.gmx .dm-map-grid.has-image::after { z-index: 0 !important; }
/* the one-tap map button beside the round box (Tom 13 Nov 20:46) */
.gmx .gmx-mapb { flex: none; width: 44px; height: 48px; min-height: 44px; padding: 0; border-radius: 10px; border: 1px solid var(--c-umber-19); background: var(--x-card); color: var(--x-gold); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.gmx .gmx-mapb svg { width: 20px; height: 20px; }
.gmx .gmx-mapb small { font: 700 9px/1 Roboto, sans-serif; letter-spacing: .06em; color: var(--x-meta); text-transform: uppercase; }
.gmx .gmx-pview .mi-pvmap { position: relative; }
.gmx .gmx-pvnote { position: absolute; left: 10px; right: 10px; top: 50%; transform: translateY(-50%); margin: 0; padding: 8px 10px; border-radius: 10px; background: rgb(from var(--c-night-07) r g b / 0.82); color: var(--x-ink); font: 500 13px/1.35 Roboto, sans-serif; text-align: center; z-index: 3; }
/* Tom 13 Nov 20:46: no black inner box in the Tools search field */
html:root[data-palette][data-palette][data-palette][data-palette] body .gmx .gmx-search input#gmxSearch[id] { background: transparent !important; background-image: none !important; border: 0 !important; box-shadow: none !important; }
/* Tom 13 Nov 20:46: headings are never cut with "..." (Fold 8 open, the sideways screens): the line wraps instead */
.gmx .gmx-mid { height: auto; min-height: var(--x-mid); white-space: normal; padding: 4px 10px; line-height: 1.25; text-align: center; }
.gmx .gmx-mid span { overflow: visible; text-overflow: clip; }
.gmx .gmx-ph h2 { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
/* Quarter-width panels (Tom 13 Nov 20:46): Map & grid labels wrap inside their buttons instead of "Fewer ...";
   the initiative list keeps the name in full, with HP and AC stacked at the right */
.gmx .gm2-ml { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.15; text-align: left; }
.gmx .gmx-pbody button:has(> .gm2-ml) { height: auto !important; min-height: 46px !important; white-space: normal !important; padding-top: 4px !important; padding-bottom: 4px !important; }
.gmx.gmx-narrow .gmx-init .gm2-irow { grid-template-columns: 22px 36px minmax(0, 1fr) auto; gap: 6px; padding-left: 2px !important; padding-right: 6px !important; }
.gmx.gmx-narrow .gmx-init .gm2-irow .ini { flex: 0 0 22px; width: 22px; min-width: 0; font-size: 16px; text-align: center; margin: 0; }
.gmx.gmx-narrow .gmx-init .gm2-irow .gm2-face { flex: 0 0 36px; width: 36px !important; height: 36px !important; }
.gmx.gmx-narrow .gmx-init .gm2-irow .who { flex: 1 1 auto; min-width: 0; }
.gmx .gmx-init .gm2-irow .who b { white-space: normal; overflow: visible; overflow-wrap: break-word; font-size: 14px; }
.gmx.gmx-narrow .gmx-init .gm2-irow .hpn { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.gmx.gmx-narrow .gmx-init .gm2-irow .acv { white-space: nowrap; }
/* no dark bands beside the map (Tom 13 Nov 20:46, tablet portrait): the map frame has no inner gutter, so the cover fit
   reaches every edge */
.gmx #dmMapScroll { padding: 0 !important; }
.gmx .gmx-pane .grow > small, .gmx .gmx-pane .grow > h2 { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
/* Tom 13 Nov 22:58: the whole map as big as it goes, centred; the space around it is the map itself, blurred and dimmed
   (no black bars). A locked view (a tap on the map) has a gold edge. */
.gmx .gmx-stage { background: var(--c-night-05); isolation: isolate; }
.gmx .gmx-stage::before { content: ""; position: absolute; inset: -40px; z-index: 0; pointer-events: none; background: var(--gmx-mapbg, none) center / cover no-repeat; filter: blur(22px) brightness(.42) saturate(.85); }
.gmx .gmx-stage > #dmMapScroll { position: relative; z-index: 1; background: transparent !important; }
.gmx.gmx-locked .gmx-stage::after { content: ""; position: absolute; inset: 0; z-index: 20; pointer-events: none; box-shadow: inset 0 0 0 3px var(--c-gold-65), inset 0 0 24px rgb(from var(--c-gold-69) r g b / 0.35); }
/* the GM v2d map's own finger gestures (pinch, pan, tap to lock): no native scrolling under them */
.gmx #dmMapScroll { touch-action: none; }

/* ===== Fold 4 open: the GM L v1b (Tom 14 Nov, brief hearth-fold-L-brief-1114) =====
   map top-left, the tools column on its right (200 dp), the band along the bottom (252 dp). Touch targets 44 dp or more,
   text 12 sp or more. Nothing over the map: the board and the exit tab only. */

/* the play-order row */

.gmxL-rnd { flex: none; min-width: 64px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--c-umber-28); background: var(--c-night-08-b); color: var(--x-gold); padding: 0 6px; position: relative; }
.gmxL-rnd small { font: 600 11px/1 Roboto, system-ui, sans-serif; color: var(--x-meta); } .gmxL-rnd b { font: 700 18px/1 Roboto, system-ui, sans-serif; }
.gmxL-rnd svg { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; }
.gmxL-rnd.on { border-color: var(--x-gold); box-shadow: 0 0 0 1px var(--x-gold); }

.gmxL-end { flex: none; height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--c-gold-79); background: linear-gradient(var(--c-gold-71), var(--c-gold-53)); color: var(--c-umber-07); -webkit-text-fill-color: var(--c-umber-07); font: 700 14.5px/1 Roboto, system-ui, sans-serif; white-space: nowrap; }
.gmxL-end span { font-size: 18px; }

/* the big space: the card or the open tool's panel */

 /* the Done bar above names it */

.gmxL-lr { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--x-line); }
.gmxL-lr span { display: flex; flex-direction: column; } .gmxL-lr small { color: var(--x-meta); font-size: 12px; } .gmxL-lr em { font: 700 18px/1 Roboto, system-ui, sans-serif; font-style: normal; color: var(--x-gold); }
.gmxL-fight { margin-top: 12px; }

/* the monster card: left (name, HP, Damage / Heal, AC), middle (actions, conditions), right (saves, Stat block, Hide, Attack) */
.gmxL-card { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr) 156px; gap: 8px; padding: 3px 8px; color: var(--x-ink); }
.gmxL-card.gmx-empty { display: block; }
.gmxL-cr { min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 3px; scrollbar-width: none; }

.gmxL-msg { margin: 0; padding: 4px 8px; border-radius: 8px; background: var(--c-night-09-c); border: 1px solid var(--c-umber-19-b); color: var(--x-gold2); font-size: 12.5px; }

.gmxL-attack { min-height: 52px; border-radius: 14px; border: 1px solid var(--c-umber-28); background: linear-gradient(var(--c-umber-25-c), var(--c-umber-17)); color: var(--c-paper-81-b); display: flex; align-items: center; gap: 6px; padding: 0 8px; text-align: left; }
.gmxL-attack span { display: flex; flex-direction: column; min-width: 0; } .gmxL-attack b { font: 700 15px/1.1 Roboto, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmxL-attack small { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmxL-attack.ready { border-color: var(--c-gold-79); background: linear-gradient(var(--c-gold-71), var(--c-gold-53)); color: var(--c-umber-07); -webkit-text-fill-color: var(--c-umber-07); }
.gmxL-attack svg { flex: none; }

/* pop-ups go in the bottom space, never over the map (notes, the roll log, the board's dialogs) */

/* ===== GM big screens v2 (Tom 14 Nov, brief hearth-gm-big-v2-brief-1114): tablet upright, tablet landscape, Fold 8 open,
   laptop. A slim tools row on top (44 dp; 40 css px on a laptop), the map at its v2d width, the pane with a slim
   initiative row, the v2d card (a tool's panel covers it) and the strip HP · Init · Attack. ===== */
.gmx.gmx-big .gmx-body { flex-direction: column !important; }
.gmxB-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.gmx.gmx-bigS .gmxB-main { flex-direction: row; }
.gmx.gmx-bigS .gmx-stage { flex: 1 1 auto; }
.gmx.gmx-bigT .gmx-stage { flex: 0 0 var(--x-maph); }
.gmx.gmx-big .gmx-exit { top: 0; }
/* the tools row */
.gmxB-tools { position: relative; flex: none; height: var(--gmxB-row, 44px); display: flex; align-items: stretch; background: var(--c-night-07-b); border-bottom: 1px solid var(--c-umber-18); font: 14px/1.2 Roboto, "Source Sans 3", system-ui, sans-serif; }
.gmxB-scroll { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 2px; padding: 0 3px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.gmxB-scroll::-webkit-scrollbar { display: none; }
.gmxB-g { display: flex; gap: 2px; flex: none; }
.gmxB-div { flex: none; width: 1px; height: 26px; background: var(--c-umber-18); margin: 0 1px; }
.gmxB-c { position: relative; flex: none; min-width: 44px; height: 44px; min-height: 44px; padding: 0 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 10px; border: 1px solid var(--c-night-20); background: var(--x-card); color: var(--x-ink); padding: 0 4px; }
.gmxB-c svg { width: 18px; height: 18px; color: var(--x-gold); }
.gmxB-c span { font: 600 12px/1 Roboto, system-ui, sans-serif; white-space: nowrap; }
.gmxB-c.open { border-color: var(--x-gold); box-shadow: inset 0 -3px 0 var(--x-gold); color: var(--x-gold2); }
.gmxB-c.filled { background: linear-gradient(var(--c-gold-71), var(--c-gold-53)); border-color: var(--c-gold-79); color: var(--c-umber-07); -webkit-text-fill-color: var(--c-umber-07); }
.gmxB-c.filled svg { color: var(--c-umber-07); }
.gmxB-c.filled.open { box-shadow: inset 0 -3px 0 var(--c-umber-25); }
.gmxB-c .gmx-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--c-blue-29); color: var(--c-blue-91); font: 700 11px/16px Roboto, sans-serif; font-style: normal; }
.gmxB-areas { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--c-umber-15); color: var(--x-gold2); font: 700 11px/16px Roboto, sans-serif; font-style: normal; text-align: center; white-space: nowrap; } /* 16 Nov: a count in the corner (the name is under the icon again) */
.gmxB-search { flex: none; display: flex; align-items: center; gap: 6px; height: 44px; box-sizing: border-box; padding: 0 0 0 10px; border-radius: 10px; border: 1px solid var(--x-gold); background: var(--c-night-05); color: var(--x-gold); }
.gmxB-search input { width: 150px; height: 36px; border: 0; background: transparent; color: var(--x-ink); font: 14px Roboto, sans-serif; outline: none; }
.gmxB-sx { width: 44px; height: 42px; border: 0; background: transparent; color: var(--x-ink); font-size: 20px; }
.gmxB-none { color: var(--x-meta); font-size: 13px; padding: 0 8px; white-space: nowrap; }
/* (253.1) the old sideways-scroll fade and › are gone: the row is the shared one-row toolbar (ui/root-rules.css .r-toolbar) */
/* the slim initiative row */
.gmxB-init { flex: none; height: 52px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid var(--x-line); }
.gmxB-rnd { min-width: 52px; height: 44px; }
.gmxB-faces { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; height: 50px; }
.gmxB-faces::-webkit-scrollbar { display: none; }
.gmx .gmxB-face.hid { opacity: .55; } .gmx .gmxB-face.hid .ring { border-style: dashed; }
.gmxB-end { height: 44px; }
.gmx.gmx-big .gmx-row, .gmx.gmx-big .gmx-mid { display: none; }
.gmxB-msg { margin: 6px 10px 0; }
.gmx.gmx-big .gmx-strip { gap: 8px; }
.gmx.gmx-big .gmx-strip .gmx-go { flex: 1 1 auto; }
/* a tool's panel covers the card (not the map, not the initiative row) */
.gmx.gmx-big .gmxB-panel { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.gmx.gmx-big .gmxB-panel .gmx-pbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.gmx.gmx-big .gmxB-panel .gmx-done, .gmx.gmx-big .gmxB-panel button, .gmx.gmx-big .gmxB-panel .gmx-chip { min-height: 44px; }
.gmx.gmx-big .gmxL-bp .gmx-board { position: static !important; inset: auto !important; transform: none !important; width: auto !important; max-width: none !important; max-height: none !important; height: auto !important; box-shadow: none !important; margin: 0 !important; border: 0 !important; }
.gmx.gmx-big .gmxL-bp .gmx-board .gm2-sheet-h { display: none; }
/* the laptop: a mouse screen, so the tools row is 40 css px */
.gmx.gmx-bigLap .gmxB-c { height: 38px; min-height: 38px; padding: 0 7px; }
.gmx.gmx-bigLap .gmxB-c svg { width: 16px; height: 16px; }
.gmx.gmx-bigLap .gmxB-c span { font-size: 12px; }
/* pop-ups and prompts go in the covered-card space, never over the map */
/* (Addendum 12F) body classes (gm-v2e.js syncBody), not a :has() on body: that made every node added anywhere on
   the page cost a full restyle (about 100 ms on a mid-range phone) */
body.gmx-on-bigS:not(.gmx-on-left) .dialog-backdrop, body.gmx-on-bigS:not(.gmx-on-left) #dmNotesWindow, body.gmx-on-bigS:not(.gmx-on-left) #hearthRollLog {
  position: fixed !important; left: auto !important; right: 0 !important; top: calc(44px + 52px) !important; bottom: 0 !important; width: 380px !important; height: auto !important; max-height: none !important; transform: none !important; z-index: 9500 !important; }
body.gmx-on-bigS.gmx-on-left .dialog-backdrop, body.gmx-on-bigS.gmx-on-left #dmNotesWindow, body.gmx-on-bigS.gmx-on-left #hearthRollLog {
  position: fixed !important; right: auto !important; left: 0 !important; top: calc(40px + 52px) !important; bottom: 0 !important; width: 360px !important; height: auto !important; max-height: none !important; transform: none !important; z-index: 9500 !important; }
body.gmx-on-bigT .dialog-backdrop, body.gmx-on-bigT #dmNotesWindow, body.gmx-on-bigT #hearthRollLog {
  position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: auto !important; height: calc(100vh - 44px - 52px - (100vh * 470 / 1024)) !important; max-height: none !important; transform: none !important; z-index: 9500 !important; }
body.gmx-on-big .dialog-backdrop { align-items: stretch !important; justify-content: stretch !important; padding: 0 !important; background: var(--x-pane, var(--c-night-09)) !important; }
body.gmx-on-big .dialog-backdrop > *, body.gmx-on-big #dmNotesWindow { max-height: 100% !important; overflow-y: auto !important; width: 100% !important; max-width: none !important; margin: 0 !important; border-radius: 0 !important; }
.gmxB-sb span { display: none; } /* the search chip is the magnifier alone */
/* touch targets on the big GM screens: the card's chips at 44 dp too */
.gmx.gmx-big:not(.gmx-bigLap) .gmx-card .gmx-chip, .gmx.gmx-big:not(.gmx-bigLap) .gmx-card .gmx-line { min-height: 44px; min-width: 44px; }
.gmxB-rdwrap { flex: none; position: relative; }
.gmx.gmx-big .gmxB-rnd small { font-size: 12px; }

/* (14 Nov) Type my roll: the Type box beside Attack (strip and the L), and Damage | Type damage after a typed hit */
.gmx .gmx-typeb { flex: 0 0 58px; min-width: 0; min-height: 48px; border-radius: 12px; border: 1px dashed var(--c-gold-52); background: var(--c-night-07); color: var(--c-gold-65); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0 4px; font: 700 13px/1.1 Roboto, sans-serif; }
.gmx .gmx-typeb small { color: var(--c-gold-61); font: 500 11px/1.1 Roboto, sans-serif; }
.gmx .gmx-typeb[aria-disabled="true"] { opacity: .45; }
.gmx .gmx-go small { display: block; font: 500 11px/1.1 Roboto, sans-serif; opacity: .8; }
.gmx .gmx-go span { display: flex; flex-direction: column; align-items: center; }
.gmx .gmx-go.gmx-tydmg b { font-weight: 700; }
.gmx.gmx-narrow .gmx-strip .gmx-typeb { flex: 0 0 50px; }

/* (14 Nov, fit-scroll sweep) a tool panel in the L band or a big screen's pane: the panel body (.gmx-pbody) is the one box that
   scrolls. The board inside it grows to its content, so it must not be a scroller of its own: an empty scroller with
   overscroll-behavior: contain swallowed the finger's drag and the panel could not be scrolled by touch. */
.gmx.gmx-big .gmxL-bp .gmx-board { overflow: visible !important; overscroll-behavior: auto !important; }
/* (14 Nov, fit-scroll sweep: "not one single box overflows") the L card's action buttons and its Attack button wrap their
   lines instead of cutting them with "…": a long action reads in full, the button grows a line taller (the column scrolls) */

.gmxL-attack b, .gmxL-attack small { white-space: normal; overflow: visible; text-overflow: clip; }

/* (14 Nov, fit-scroll sweep) the strip with Type beside Attack on a narrow screen (Fold shut 344, phones under 440): every
   button fits, Next turn included (it ran 31 px off the screen) */
@media (max-width: 440px), (max-height: 520px) { /* (fix job 14 Nov) and a phone on its side, where the card pane is ~330 px wide */
  .gmx .gmx-strip:has(.gmx-typeb) { gap: 4px; padding: 4px 6px; }
  .gmx .gmx-strip:has(.gmx-typeb) .gmx-shp { flex: 0 0 52px; }
  .gmx .gmx-strip:has(.gmx-typeb) .gmx-sinit { flex: 0 0 44px; }
  .gmx .gmx-strip:has(.gmx-typeb) .gmx-go { flex: 1 1 0; min-width: 0; padding: 0 4px; font-size: 14px; gap: 4px; }
  .gmx .gmx-strip:has(.gmx-typeb) .gmx-go svg { display: none; }
  .gmx .gmx-strip:has(.gmx-typeb) .gmx-typeb { flex: 0 0 50px; }
  .gmx .gmx-strip:has(.gmx-typeb) .gmx-next { flex: 0 0 64px; min-width: 0; padding: 0 4px; font-size: 13px; line-height: 1.1; white-space: normal; text-align: center; }
}
/* (14 Nov, fit-scroll sweep) the top row's buttons take the width of their own word ("Hide / Show" ran 5 px past its 52 px) */
.gmx .gmx-rb { width: auto; padding: 0 6px; }
/* (15 Nov, Tom: one Done, no duplicates) in the big pane the Help board has the pane's Done above it, so the help text's own
   Done (kept for the Games screen's help, which has nothing else to close it) is not shown here */
.gmx .gmxL-bp .gm2-help > button[data-gm2-done] { display: none; }
/* (253.1 part C, Tom 16 Nov 01:22) the one slim tools row: icons (their names show on hold / hover: the shared Toolbar,
   ui/root-rules), the row's height from --gm-toolbar-h; More sits at the row's end */
.gmx .gmxB-tools.r-toolbar { height: calc(var(--gmxB-row, var(--gm-toolbar-h)) + var(--safe-t)); box-sizing: border-box; }
.gmx .gmxB-tools.r-toolbar .gmxB-c svg { width: var(--icon-md); height: var(--icon-md); }
.gmx.gmx-bigLap .gmxB-tools.r-toolbar .gmxB-c svg { width: var(--icon-sm); height: var(--icon-sm); }
.gmx .gmxB-tools.r-toolbar > .r-more { align-self: center; margin: 0 var(--gm-tool-gap) 0 var(--sp-half); }
.gmx .gmxB-init { height: var(--gm-init-h); }
/* before Start combat (item 13) the same layout; the row's end button starts the fight */
.gmx.gmx-pre .gmxB-end { background: linear-gradient(var(--c-gold-71), var(--c-gold-53)); color: var(--c-umber-07); -webkit-text-fill-color: var(--c-umber-07); }
/* (addendum 6) the Torch switch on the creature card: a small flame before the word; lit = the gold "on" chip */
.gmx .gmx-chip.gmx-torch { display: inline-flex; align-items: center; gap: 0.25rem; }
.gmx .gmx-chip.gmx-torch svg { width: 0.875rem; height: 0.875rem; flex: none; }
.gmx .gmx-chip.gmx-torch.on svg { color: var(--lock-x-ffd27a); }
/* (addendum 8) Game & encounters: one full-width themed action per row (48 dp), icon + label; the deletes at the foot */
.gmx .gmx-acts1 { display: flex; flex-direction: column; gap: 0.5rem; margin: 0 0 0.75rem; }
.gmx .gmx-acts1 > .gmx-b.gmx-act { width: 100%; min-height: var(--tap, 3rem); justify-content: flex-start; gap: 0.625rem; padding: 0 0.875rem; text-align: left; font-size: 0.875rem; }
.gmx .gmx-acts1 > .gmx-b.gmx-act svg { width: 1.125rem; height: 1.125rem; flex: none; color: var(--x-gold); }
.gmx .gmx-acts1 > .gmx-actin { width: 100%; min-height: var(--tap, 3rem); }
.gmx .gmx-acts1.gmx-danger { margin-top: 1.25rem; padding-top: 1rem; border-top: 0.0625rem solid var(--c-umber-19); }
.gmx .gmx-acts1 > .gmx-b.danger { border-color: var(--c-red-59); color: var(--c-red-66); }
.gmx .gmx-acts1 > .gmx-b.danger svg { color: var(--c-red-66); }
.gmx .gmx-acts1 > .gmx-b.gmx-act { margin: 0; }
.gmx .gmx-encrow + .gmx-sec, .gmx .gmx-acts1 + .gmx-sec { margin-top: 0.875rem; }
/* (12E) an attack loaded for the strip's Attack and Type, on the shared attack row (ui/attack-row.css) */
.gmx .gmx-atr.on { box-shadow: inset var(--sp-1) 0 0 var(--x-gold); background: rgb(from var(--x-gold) r g b / 0.08); }
.gmx .gmx-atr { padding-left: var(--sp-2); padding-right: var(--sp-1); }

/* ---------- GM Edit vs Play (Tom approved 22 Nov 08:43; design gm-edit-play-1121/v2/SPEC-v2.md) ----------
   The same cards in both modes, different buttons. Edit = oxblood tooled leather (the Dark v2 / Light v2 leather):
   the tools row becomes a leather band, the map gets a tooled frame, tokens a dashed "drag me" outline. Play is the
   GM screen as it was. The switch is at the right-hand end of the tools row on every screen. */
.gmx .gmx-mode { display: flex; flex: none; align-self: center; height: 44px; padding: 2px; gap: 2px; box-sizing: border-box; border-radius: 11px; border: 1px solid #c89d40; background: #151516; position: relative; z-index: 1; }
.gmx .gmxB-tools > .gmx-mode { margin: 0 4px 0 6px; }
.gmx .gmx-row > .gmx-mode { margin-left: auto; }
.gmx .gmx-mb { all: unset; box-sizing: border-box; position: relative; width: 40px; height: 38px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer;
  font: 700 11px Roboto, "Segoe UI", system-ui, sans-serif; letter-spacing: .02em; color: #c9ccd3; -webkit-tap-highlight-color: transparent; }
.gmx .gmx-mb::before { content: ''; position: absolute; top: -3px; bottom: -3px; left: -2px; right: -2px; } /* 44 dp to the finger */
.gmx .gmx-mb svg { width: 17px; height: 17px; }
.gmx .gmx-mb.e.on { background: linear-gradient(#fff6e3, #f3e3c0) !important; color: #7a1f12 !important; border: 0 !important; box-shadow: inset 0 1px 0 #fffdf6, 0 1px 3px rgba(0,0,0,.5) !important; }
.gmx .gmx-mb.p.on { background: linear-gradient(#f0cd79, #c99a45) !important; color: #1a1408 !important; border: 0 !important; box-shadow: inset 0 1px 0 rgba(255,246,220,.8), 0 1px 3px rgba(0,0,0,.5) !important; }
.gmx .gmx-mb.on span, .gmx .gmx-mb.on svg { color: inherit !important; }
.gmx .gmx-mb:focus-visible { outline: 2px solid #f0cd79; outline-offset: 1px; }
/* Edit: the leather band */
.gmx.gmx-m-edit .gmxB-tools, .gmx.gmx-m-edit .gmx-row { background: radial-gradient(120% 140% at 50% 0%, rgba(255,200,170,.18), transparent 60%), linear-gradient(#962f1f, #6e1b10 55%, #521209) !important; position: relative; }
.gmx.gmx-m-edit .gmxB-tools::after, .gmx.gmx-m-edit .gmx-row::after { content: ''; position: absolute; inset: 2px; border: 1px dashed rgba(240,200,150,.5); border-radius: 3px; pointer-events: none; }
.gmx.gmx-m-edit .gmxB-tools .gmxB-c, .gmx.gmx-m-edit .gmx-row .gmx-rb { background: linear-gradient(#3a120b, #26100a) !important; border-color: rgba(214,170,90,.55) !important; color: #fbecd6 !important; }
.gmx.gmx-m-edit .gmxB-tools .gmxB-c svg, .gmx.gmx-m-edit .gmx-row .gmx-rb svg { color: #f6dfa8 !important; }
.gmx.gmx-m-edit .gmxB-tools .gmxB-c span, .gmx.gmx-m-edit .gmx-row .gmx-rb span { color: #fbecd6 !important; }
.gmx.gmx-m-edit .gmxB-tools .gmxB-c.open, .gmx.gmx-m-edit .gmx-row .gmx-rb.on { background: linear-gradient(#fff6e3, #f3e3c0) !important; }
.gmx.gmx-m-edit .gmxB-tools .gmxB-c.open svg, .gmx.gmx-m-edit .gmxB-tools .gmxB-c.open span, .gmx.gmx-m-edit .gmx-row .gmx-rb.on svg, .gmx.gmx-m-edit .gmx-row .gmx-rb.on span { color: #7a1f12 !important; }
.gmx.gmx-m-edit .gmx-mid { background: linear-gradient(#6e1b10, #521209) !important; }
.gmx.gmx-m-edit .gmx-mid span { color: #fbecd6 !important; font-weight: 700; letter-spacing: .03em; }
.gmx.gmx-m-edit .gmx-mid .gmx-dia { background: #f0cd79 !important; }
/* Edit: the tooled map frame (drawn over the board; taps go through) and draggable tokens */
.gmx.gmx-m-edit .gmx-stage::after { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 0 1px #c89d40, inset 0 0 0 3px #7a1f12, inset 0 0 0 4px #c89d40, inset 0 0 20px 4px rgba(122,31,18,.5); outline: 1px dashed rgba(240,200,150,.5); outline-offset: -6px; }
.gmx.gmx-m-edit .map-token { outline: 2px dashed #fbecd6; outline-offset: 2px; }
/* Play › (Edit's way back to the fight) and Add creature */
.gmx .gmx-toplay, .gmx .gmxB-end.gmx-toplay, .gmx .gmx-next.gmx-toplay { background: linear-gradient(#f0cd79, #c99a45) !important; color: #1a1408 !important; border: 1px solid #f3e2b0 !important; font-weight: 700 !important; }
.gmx .gmx-toplay span { color: #1a1408 !important; }
.gmx .gmx-go.gmx-add { background: linear-gradient(#2a2a2e, #19191c) !important; border: 1px solid #c89d40 !important; color: #f4e8cc !important; opacity: 1 !important; flex-direction: row !important; justify-content: center; align-items: center; gap: 6px; }
.gmx .gmx-go.gmx-add span { color: inherit !important; font-weight: 700; }
.gmx .gmx-go.gmx-add svg { width: 18px; height: 18px; flex: none; }
.gmx .gmx-chip.gmx-rm { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 0 10px; }
.gmx .gmx-chip.gmx-rm svg { width: 17px; height: 17px; }
.gmx .gmx-atr-ro .atr-mt { white-space: normal; }
.gmx .gmx-row > .gmx-chips:empty { display: none; } /* (Edit vs Play) an empty span pushed the switch to a second line at 1024x550 */
/* (Edit vs Play) Light: Add creature and the switch's track on the light card colour, not a black slab */
html[data-look="light"] .gmx .gmx-go.gmx-add { background: linear-gradient(#fffaf0, #f1e4c8) !important; border-color: #a77a2c !important; color: #5a1a10 !important; }
html[data-look="light"] .gmx .gmx-mode { background: #f6ecd6; border-color: #a77a2c; }
html[data-look="light"] .gmx .gmx-mb:not(.on) { color: #4a3a22; }
html[data-look="light"] .gmx.gmx-m-edit .gmx-mode { background: #3a120b; border-color: #c89d40; }
html[data-look="light"] .gmx.gmx-m-edit .gmx-mb:not(.on) { color: #fbecd6; }

/* ---------- Edit Set up panel (Tom 23 Nov 08:39, matches picker-deck-1123 mocks) ---------- */
.gmx .gmx-setup { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; overflow: hidden; background: #141314; border-top: 1px solid rgba(200, 157, 64, .35); }
.gmx .gmx-setup * { box-sizing: border-box; }
.gmx .gmx-seth { display: flex; align-items: center; gap: 8px; padding: 8px 12px 6px; flex: none; }
.gmx .gmx-seth b { font: 700 19px "Cormorant Garamond", Georgia, serif; color: #f6e7c8; letter-spacing: .01em; }
.gmx .gmx-seth small { font: 500 12px Roboto, system-ui, sans-serif; color: #b9ad97; margin-left: auto; white-space: nowrap; }
.gmx .gmx-stag { font: 700 10px Roboto, system-ui, sans-serif; letter-spacing: .08em; color: #fbecd6; background: #7a1f12; border: 1px solid #c89d40; border-radius: 999px; padding: 3px 8px; }
.gmx .gmx-sbody { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 10px 10px; }
.gmx .gmx-sbody.gmx-stwo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; align-items: start; }
.gmx .gmx-ssec { font: 700 11px Roboto, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #d8b46a; margin: 8px 2px 6px; }
.gmx .gmx-stiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gmx .gmx-st { all: unset; box-sizing: border-box; min-height: 52px; border-radius: 10px; border: 1px solid rgba(200, 157, 64, .45); background: linear-gradient(#232124, #19181a); color: #f2e6cf; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 600 11.5px/1.1 Roboto, system-ui, sans-serif; text-align: center; padding: 5px 2px; cursor: pointer; }
.gmx .gmx-st svg { width: 20px; height: 20px; color: #f0cd79; }
.gmx .gmx-st.gmx-gold { background: linear-gradient(#f0cd79, #c99a45); color: #1a1408; border-color: #f3e2b0; }
.gmx .gmx-st.gmx-gold svg { color: #1a1408; }
.gmx .gmx-st span { display: block; }
.gmx .gmx-st em { display: block; font-style: normal; font-size: 9.5px; color: #b9ad97; font-weight: 500; }
.gmx .gmx-st.gmx-gold em { color: #3a2a0c; }
.gmx .gmx-slist { display: flex; flex-direction: column; gap: 6px; }
.gmx .gmx-sg { border: 1px solid rgba(200, 157, 64, .28); border-radius: 12px; background: #1b1a1c; overflow: hidden; }
.gmx .gmx-sgh { display: flex; align-items: center; gap: 8px; padding: 6px 8px; min-height: 52px; cursor: pointer; }
.gmx .gmx-sgh img, .gmx .gmx-sgh > b { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #b8332a; object-fit: cover; flex: none; }
.gmx .gmx-sgh > b { display: flex; align-items: center; justify-content: center; background: #19181a; color: #f6e7c8; font: 700 16px "Cormorant Garamond", Georgia, serif; }
.gmx .gmx-sgn { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.gmx .gmx-sgn b { font: 700 15px/1.1 "Cormorant Garamond", Georgia, serif; color: #f6e7c8; }
.gmx .gmx-sgn small { font: 500 11px Roboto, sans-serif; color: #b9ad97; }
.gmx .gmx-sstep { display: flex; align-items: center; gap: 4px; flex: none; }
.gmx .gmx-sstep button { all: unset; box-sizing: border-box; width: 44px; height: 44px; border-radius: 8px; border: 1px solid rgba(200, 157, 64, .4); display: flex; align-items: center; justify-content: center; color: #f0cd79; background: #19181a; }
.gmx .gmx-sstep span { min-width: 36px; text-align: center; font: 700 14px Roboto, sans-serif; color: #f6e7c8; }
.gmx .gmx-sstep span i { display: block; font: 500 8px/1 Roboto, sans-serif; letter-spacing: .06em; color: #b9ad97; font-style: normal; }
.gmx .gmx-srows { border-top: 1px solid rgba(200, 157, 64, .2); padding: 4px 8px 8px; }
.gmx .gmx-sr { display: flex; align-items: center; gap: 6px; min-height: 44px; }
.gmx .gmx-srn { flex: 1 1 auto; min-width: 0; font: 600 13px Roboto, sans-serif; color: #f2e6cf; }
.gmx .gmx-srn small { display: block; font: 500 11px Roboto, sans-serif; color: #b9ad97; }
.gmx .gmx-sib { all: unset; box-sizing: border-box; width: 44px; height: 44px; border-radius: 8px; border: 1px solid rgba(200, 157, 64, .4); display: flex; align-items: center; justify-content: center; color: #f0cd79; background: #19181a; }
.gmx .gmx-schip { all: unset; box-sizing: border-box; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px dashed rgba(200, 157, 64, .55); color: #f6e7c8; font: 600 13px Roboto, sans-serif; display: inline-flex; align-items: center; gap: 6px; }
.gmx .gmx-schip svg { width: 16px; height: 16px; color: #f0cd79; }
.gmx .gmx-spc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gmx .gmx-spc span { display: inline-flex; align-items: center; gap: 6px; color: #f2e6cf; font: 600 13px Roboto, sans-serif; }
.gmx .gmx-spc img, .gmx .gmx-spc span > b { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #c89d40; object-fit: cover; }
.gmx .gmx-spc span > b { display: flex; align-items: center; justify-content: center; background: #19181a; font: 700 14px "Cormorant Garamond", Georgia, serif; }
.gmx .gmx-snote { font: 500 12px/1.35 Roboto, sans-serif; color: #b9ad97; margin: 10px 2px 0; }
.gmx .gmx-setup.gmx-short .gmx-st em { display: none; }
.gmx.gmx-m-edit .gmx-strip .gmx-shp { display: none; }
