/* The night market, version 3 (src/scenes/market3.js), in the Mobile shop look Mike picked (research/mocks/night11,
   Oct 17 2026). It takes the whole screen: .m3 covers the stage, and .m3-fi is laid out in its own pixels and zoomed
   to fill it (market3.js sizeOf). Its print is the 16 px set inline on .m3-fi, a whole number of font pixels at every
   zoom step, so every text here is `inherit` and fontsnap.js leaves it alone: never give a size in px here.
   Packs and items are drawn by src/items/art (css/areas/pk3.css). */
#modal.area .m3 { position: absolute; left: calc(var(--ox) * -1); top: calc(var(--oy) * -1); overflow: hidden; pointer-events: auto; isolation: isolate;
  --ink: #24124a; --lav: #f1ecff; --dash: #c8baf0; --vio: #6a3cff; --gold: #ffcf3a; --red: #d0224a; --grn: #3ad06a;
  background: linear-gradient(160deg, #6a3cff, #2c8cff); color: var(--ink); }
/* the cloth's colours drift (Mike, Oct 17: "have the background shift in gradient"): the gradient on a layer of its own
   under the stripes, its hue turned slowly back and forth, which the compositor plays without painting anything again */
@keyframes m3Shift { 0% { filter: hue-rotate(-28deg); } 50% { filter: hue-rotate(6deg); } 100% { filter: hue-rotate(34deg); } }
#modal.area .m3::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; will-change: filter;
  background: linear-gradient(150deg, #7a3cff 0%, #4a5cff 45%, #2c8cff 75%, #22b0f0 100%); animation: m3Shift 14s ease-in-out infinite alternate; }
body:is(.calm, .fx-off) #modal.area .m3::after { animation: none; }
/* the stripes scroll: the layer runs one stripe's width (36 / cos 45°) past the left edge and slides that far, so the loop
   never shows its seam (Mike, Oct 17) */
@keyframes m3Stripes { to { transform: translateX(50.912px); } }
#modal.area .m3::before { content: ''; position: absolute; top: 0; bottom: 0; left: -52px; right: 0; pointer-events: none; will-change: transform;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.07) 0 18px, transparent 18px 36px); animation: m3Stripes 2.6s linear infinite; }
body:is(.calm, .fx-off) #modal.area .m3::before { animation: none; }
#modal.area .m3 [hidden] { display: none !important; }
#modal.area .m3-fi { position: relative; display: grid; grid-template-columns: var(--lw) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); line-height: 1.15;
  pointer-events: none; font-variant-ligatures: none; font-variant-numeric: tabular-nums; }
#modal.area .m3 :is(button, [data-tip], [data-tip-item], [data-reg], .m3-bub, .m3-over) { pointer-events: auto; }
#modal.area .m3 :is(p, b, span, em, i, h4) { margin: 0; font-style: normal; font-weight: inherit; font-size: inherit; text-shadow: none; }
#modal.area .m3 button { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; text-shadow: none; font: inherit; color: inherit;
  cursor: pointer; min-width: 0; min-height: 0; line-height: 1.1; text-align: center; }
#modal.area .m3 button:disabled { cursor: default; }
#modal.area .m3 button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
#modal.area .m3 img { image-rendering: pixelated; -webkit-user-drag: none; user-select: none; }
#modal.area .m3 .m3-gap { flex: 1; }
#modal.area .m3 .m3-grow { flex: 1; min-width: 0; }
#modal.area .m3 .m3-none { opacity: 0.6; white-space: nowrap; }
#modal.area .m3 .m3-shut { position: absolute; inset: 0; z-index: 1; pointer-events: auto; }

/* print: one line, or a block of lines (m3-w) clamped to its room */
#modal.area .m3 .m3-t { display: block; white-space: nowrap; overflow: hidden; min-width: 0; }
#modal.area .m3 .m3-t > span { display: block; overflow: hidden; text-overflow: ellipsis; }
#modal.area .m3 .m3-t.m3-w { white-space: normal; }
#modal.area .m3 .m3-t.m3-w > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines, 2); line-clamp: var(--lines, 2); }
#modal.area .m3 .m3-hint { opacity: 0.72; }
#modal.area .m3 .m3-neg { color: #ff8a9e; }
#modal.area .m3 .m3-fin { color: #8fd8ff; }

/* ---------- your panel: every zone always in view ---------- */
#modal.area .m3-me { position: relative; z-index: 2; display: grid; gap: 3px 5px; padding: 4px; margin: 6px; min-width: 0; min-height: 0;
  grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'mh mh' 'zb zb' 'zh zh' 'zs zg' 'zd zd' 'zp zp' 'zn zt'; align-content: stretch;
  background: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); pointer-events: none; }
#modal.area .m3-c1, #modal.area .m3-c2 { display: contents; }
#modal.area .m3-mh { grid-area: mh; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'nt nav' 'mn mn'; gap: 2px 6px; align-items: center; min-width: 0; }
#modal.area .m3-nt { grid-area: nt; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; min-width: 0; overflow: hidden; }
#modal.area .m3-nt b { color: var(--vio); } #modal.area .m3-nt i { color: #8a7ab0; }
#modal.area .m3-nav { grid-area: nav; display: flex; gap: 3px; }
#modal.area .m3 .m3-nv { width: 24px; height: 23px; display: grid; place-items: center; background: var(--vio); border: 2px solid var(--ink); border-radius: 7px; box-shadow: 0 2px 0 var(--ink); }
#modal.area .m3 .m3-nv:hover { filter: brightness(1.12); }
#modal.area .m3 .m3-nv:active { translate: 0 1px; box-shadow: 0 1px 0 var(--ink); }
#modal.area .m3 .m3-nv .ico { width: 20px; height: 18px; background-size: contain; }
#modal.area .m3-mn { grid-area: mn; display: flex; gap: 8px; white-space: nowrap; min-width: 0; }
#modal.area .m3-mn > span { display: flex; align-items: baseline; border-radius: 10px; padding: 0 8px; min-width: 0; }
#modal.area .m3-mn em { margin-right: 5px; opacity: 0.75; flex: none; }
#modal.area .m3-mn .m3-t { flex: 0 1 auto; }
#modal.area .m3 .m3-cash { background: var(--ink); color: #fff; } #modal.area .m3 .m3-cash .m3-t { color: #5dff8a; }
#modal.area .m3 .m3-rent { background: #ffe1e8; } #modal.area .m3 .m3-rent .m3-t { color: var(--red); }
#modal.area .m3 .m3-rent.m3-boss { background: #ffd0a0; }
#modal.area .m3-z { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--lav); border-radius: 8px; padding: 0 3px 2px; }
#modal.area .m3-z h4 { margin: 0 0 2px; display: flex; gap: 6px; white-space: nowrap; line-height: 1.05; pointer-events: auto; }
#modal.area .m3-z h4 i { background: var(--vio); color: #fff; border-radius: 8px; padding: 0 5px; }
#modal.area .m3-zr { display: flex; gap: 3px; align-items: center; min-width: 0; min-height: 32px; flex: 1; }
#modal.area .m3-zb { grid-area: zb; } #modal.area .m3-zh { grid-area: zh; } #modal.area .m3-zs { grid-area: zs; } #modal.area .m3-zd { grid-area: zd; }
#modal.area .m3-zg { grid-area: zg; } #modal.area .m3-zp { grid-area: zp; } #modal.area .m3-zn { grid-area: zn; } #modal.area .m3-zt { grid-area: zt; }
#modal.area .m3-zg .m3-zr { overflow: hidden; }

/* what can be picked glows, what cannot fades, what is picked lifts */
@keyframes m3Glow { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 7px 2px rgba(255, 207, 58, 0.9); } }
#modal.area .m3 .m3-target { box-shadow: 0 0 0 2px var(--gold), 0 0 3px 1px rgba(255, 207, 58, 0.6); animation: m3Glow 1.1s ease-in-out infinite; z-index: 3; }
#modal.area .m3 .m3-dimmed { opacity: 0.38; }
#modal.area .m3 .m3-lift { translate: 0 -3px; box-shadow: 0 0 0 2px var(--vio), 0 3px 0 var(--ink); z-index: 3; }
#modal.area .m3 .m3-on { box-shadow: 0 0 0 2px var(--vio); z-index: 3; }
body.calm #modal.area .m3 .m3-target { animation: none; }

/* the Box: eight places; a pack fills its place, an empty place shows its number in its middle */
#modal.area .m3-zb .m3-zr { gap: 3px; justify-content: space-between; }
#modal.area .m3 .m3-bw { position: relative; width: var(--bw); height: var(--bh); flex: none; display: grid; place-items: center; border-radius: 6px; background: #fff; }
#modal.area .m3 .m3-bw .pk3 { width: calc(var(--bw) - 2px); height: calc(var(--bh) - 2px); display: block; }
#modal.area .m3 .m3-bw.m3-em { border: 2px dashed var(--dash); background: transparent; }
#modal.area .m3 .m3-bw.m3-em b { color: #a898d8; }
#modal.area .m3 .m3-bp:not(:disabled):hover { translate: 0 -2px; }
#modal.area .m3 .m3-bw.m3-next::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: -3px; height: 2px; border-radius: 1px; background: var(--grn); }
#modal.area .m3 .m3-bw.m3-temp { outline: 2px dashed #e8742c; outline-offset: -1px; }
#modal.area .m3 .m3-reg { position: absolute; z-index: 2; pointer-events: none; border: 1px solid var(--gold); background: rgba(255, 207, 58, 0.18); opacity: 0; transition: opacity 0.12s; }
#modal.area .m3 .m3-reg.m3-rcurse { border-color: #ff4a6a; background: rgba(255, 74, 106, 0.2); }
#modal.area .m3 .m3-reg:is(.m3-ron, .m3-ron2) { opacity: 1; }

/* places: hold, shelf, Deals, Guides */
#modal.area .m3 .m3-sl { position: relative; width: var(--ss); height: var(--ss); display: grid; place-items: center; flex: none; background: #fff; border-radius: 6px; }
#modal.area .m3 .m3-sl .pk3 { width: var(--ss); height: var(--ss); display: block; }
#modal.area .m3 .m3-sl.m3-em { border: 2px dashed var(--dash); background: transparent; }
#modal.area .m3 .m3-sl.m3-slock { opacity: 0.4; }
#modal.area .m3 .m3-sl.m3-lock .art { width: 14px; height: 16px; background: center / contain no-repeat; image-rendering: pixelated; opacity: 0.7; }
#modal.area .m3 .m3-sl.m3-tgt { border-color: var(--gold); border-style: solid; }
#modal.area .m3 .m3-ghost { opacity: 0.55; display: grid; place-items: center; }
#modal.area .m3 .m3-ghost .pk3 { width: calc(var(--ss) - 4px); height: calc(var(--ss) - 4px); }
#modal.area .m3 :is(.m3-sock, .m3-hs, .m3-gb, .m3-fix):not(:disabled):hover { translate: 0 -2px; }
#modal.area .m3-zs .m3-zr { gap: 2px; } #modal.area .m3-zh .m3-zr { gap: 3px; } #modal.area .m3-zg .m3-zr { gap: 2px; }
/* a Trinket's paper and bad sticker, as small corners */
#modal.area .m3 .m3-tstk, #modal.area .m3 .m3-tbad { position: absolute; top: 1px; width: 6px; height: 6px; border: 1px solid var(--ink); border-radius: 1px; pointer-events: none; }
#modal.area .m3 .m3-tstk { right: 1px; background: #fff3a8; } #modal.area .m3 .m3-tbad { left: 1px; background: #ff4a6a; }
#modal.area .m3 .m3-more { padding-left: 2px; white-space: nowrap; color: var(--vio); }

/* level pips: one small dot a level, on the bottom edge of what they belong to */
#modal.area .m3 .m3-pips { position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%); display: flex; gap: 1px; padding: 1px; background: var(--ink); border-radius: 3px; z-index: 2; pointer-events: none; }
#modal.area .m3 .m3-pips i { width: 3px; height: 3px; background: var(--gold); border-radius: 1px; display: block; }

/* Deals: each with its name and USE */
#modal.area .m3-zd .m3-zr { gap: 6px; }
#modal.area .m3 .m3-dl { display: grid; grid-template-columns: var(--ss) minmax(0, 1fr); gap: 4px; align-items: center; min-width: 0; flex: 1 1 0; }
#modal.area .m3 .m3-dl > .m3-sl.m3-em { width: var(--ss); }
#modal.area .m3 .m3-dt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
#modal.area .m3 .m3-dn { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#modal.area .m3 .m3-dl.m3-em .m3-dn { opacity: 0.5; }
#modal.area .m3 .m3-use { padding: 1px 4px; background: var(--gold); border: 2px solid var(--ink); border-radius: 7px; }
#modal.area .m3 .m3-use:disabled { background: var(--dash); opacity: 0.7; }

/* the party: each pet's own sprite; the bench, its sprites in a row (every pet works with the team: no aim to set) */
#modal.area .m3-zp .m3-zr { gap: 2px; } #modal.area .m3-zn .m3-zr { gap: 4px; }
#modal.area .m3 .m3-pt { position: relative; width: var(--pw); height: var(--pw); display: flex; flex-direction: column; flex: none; }
#modal.area .m3 .m3-pic { position: relative; display: grid; place-items: center; background: #fff; border-radius: 6px; overflow: visible; }
#modal.area .m3 .m3-pt .m3-pic { width: 100%; height: 100%; border-radius: 6px; flex: none; }
#modal.area .m3 .m3-pic .comp-pic { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; display: block; pointer-events: none; }
#modal.area .m3 .m3-pt .m3-pips { bottom: 0; }
#modal.area .m3 .m3-ptier { position: absolute; left: 2px; top: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--pc); border: 1px solid var(--ink); pointer-events: none; }
#modal.area .m3 :is(.m3-pt, .m3-bp2).m3-em, #modal.area .m3 .m3-pt.m3-lk { display: grid; place-items: center; text-align: center; border: 2px dashed var(--dash); border-radius: 6px; color: #8a7ab0; }
#modal.area .m3 .m3-pt.m3-lk { align-content: center; gap: 2px; }
#modal.area .m3 .m3-pt.m3-lk .art { width: 14px; height: 16px; background: center / contain no-repeat; image-rendering: pixelated; opacity: 0.7; }
#modal.area .m3 .m3-pt.m3-lk b { line-height: 1; }
#modal.area .m3 .m3-bp2 { position: relative; width: var(--ss); height: var(--ss); flex: none; display: block; }
#modal.area .m3 .m3-bp2 .m3-pic { width: 100%; height: 100%; }
#modal.area .m3 .m3-pic:not(:disabled):hover { translate: 0 -2px; }

/* the tray: its best three cards */
#modal.area .m3 .m3-trayb { display: flex; align-items: center; gap: 3px; justify-content: flex-start; border-radius: 6px; }
#modal.area .m3 .m3-trayb:not(:disabled):hover { background: #fff; }
#modal.area .m3 .m3-tc { width: 23px; height: 32px; flex: none; display: block; overflow: hidden; border-radius: 2px; }
#modal.area .m3 .m3-tc > * { width: 100% !important; height: 100% !important; display: block; margin: 0; }
#modal.area .m3 .m3-tc img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Gus's side ---------- */
#modal.area .m3-gus { position: relative; z-index: 2; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 6px 6px 6px 2px; gap: 5px; pointer-events: none; }
#modal.area .m3-tabs { display: flex; gap: 3px; min-width: 0; flex: none; overflow: hidden; padding-bottom: 3px; }
#modal.area .m3 .m3-tb { display: flex; align-items: center; gap: 4px; white-space: nowrap; flex: none; background: rgba(255,255,255,0.25); color: #fff;
  border: 2px solid var(--ink); border-radius: 16px; box-shadow: 0 3px 0 var(--ink); padding: 3px 8px; }
#modal.area .m3 .m3-tb.m3-on { background: #fff; color: var(--ink); }
#modal.area .m3 .m3-tb:not(.m3-on):hover { background: rgba(255,255,255,0.4); }
#modal.area .m3 .m3-tb .m3-tn { min-width: 14px; text-align: center; line-height: 1; padding: 1px 2px; background: var(--tc); color: var(--ink); border-radius: 8px; border: 1px solid var(--ink); }
#modal.area .m3 .m3-tabs.m3-tight { gap: 2px; } #modal.area .m3 .m3-tabs.m3-tight .m3-tb { padding: 3px 4px; gap: 2px; }
#modal.area .m3 .m3-tabs.m3-bare .m3-tw { letter-spacing: -0.8px; }
#modal.area .m3 .m3-tb.m3-zero { opacity: 0.6; }
#modal.area .m3 .m3-tabs.m3-dots .m3-tb:not(.m3-on) { background: var(--tc); padding: 3px 5px; } #modal.area .m3 .m3-tabs.m3-dots .m3-tb:not(.m3-on) .m3-tw { display: none; }
#modal.area .m3 .m3-tabs.m3-dots .m3-tb:not(.m3-on) .m3-tn { background: #fff; }
#modal.area .m3-fitting .m3-tb, #modal.area .m3.fitting .m3-tb { pointer-events: none; }
#modal.area .m3-gh { display: flex; gap: 8px; align-items: center; flex: none; min-height: 40px; background: var(--ink); border-radius: 10px; padding: 3px 8px; color: #fff; min-width: 0; }
#modal.area .m3 .m3-gp { width: 34px; height: 34px; flex: none; background: var(--gold) center / 90% no-repeat; border-radius: 50%; image-rendering: pixelated; }
#modal.area .m3 .m3-gl { flex: 1; --lines: 2; }

/* the strip: what a fit in progress asks */
#modal.area .m3-gh.m3-fit { padding: 3px 6px; background: #2c1a5e; box-shadow: inset 0 0 0 2px var(--gold); }
#modal.area .m3 .m3-strip { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
#modal.area .m3 .m3-sh { display: flex; align-items: center; gap: 5px; min-width: 0; }
#modal.area .m3 .m3-sname { flex: 1; color: var(--gold); }
#modal.area .m3 .m3-sline { gap: 6px; }
#modal.area .m3 .m3-say { flex: 1; --lines: 1; }
#modal.area .m3 .m3-sbtns { display: flex; gap: 4px; flex: none; }
#modal.area .m3 .m3-stb { height: 22px; padding: 0 7px; white-space: nowrap; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 2px 0 #120a2a; }
#modal.area .m3 .m3-stb.m3-go { background: var(--grn); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
#modal.area .m3 .m3-stb.m3-gold { background: var(--gold); }
#modal.area .m3 .m3-stb.m3-wine { background: #ff6a8a; color: #fff; text-shadow: 1px 1px 0 var(--ink); }
#modal.area .m3 .m3-stb.m3-gchip.m3-on { background: #ffe1e8; box-shadow: 0 0 0 2px var(--gold); }
#modal.area .m3 .m3-stb:disabled { opacity: 0.5; }
#modal.area .m3 .m3-kchip { flex: none; padding: 0 4px; border-radius: 6px; background: var(--kc); color: var(--ki); white-space: nowrap; line-height: 1.15; }
#modal.area .m3 .m3-kdot { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--kc); box-shadow: 0 0 0 1px #fff; }
#modal.area .m3 .m3-x { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; line-height: 1; }
#modal.area .m3 .m3-x:hover { background: #ff6a8a; }

/* the stock: two columns, at least two rows */
#modal.area .m3-cds { display: grid; grid-template-columns: repeat(var(--cc, 2), minmax(0, 1fr)); grid-template-rows: repeat(var(--cr), minmax(0, 1fr)); gap: 6px; min-height: 0; flex: 1; }
#modal.area .m3 .m3-cd { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
#modal.area .m3 .m3-cd > :not(.m3-read) { position: relative; z-index: 1; pointer-events: none; }
#modal.area .m3 .m3-read { position: absolute; inset: 0; z-index: 0; border-radius: 9px; }
#modal.area .m3 .m3-cd:hover .m3-read { background: #f7f3ff; }
#modal.area .m3 .m3-cd.m3-on { box-shadow: 0 0 0 3px var(--gold), 0 4px 0 var(--ink); }
/* the band in its kind's colour (the brand's, as the bubble's chip and the pack's parts wear it), so a card says what kind
   of thing it is at a glance */
#modal.area .m3 .m3-cb { display: flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; line-height: 1.05; background: var(--tc); color: var(--ti, var(--ink)); border-bottom: 2px solid var(--ink); padding: 3px 6px 2px; min-width: 0; }
#modal.area .m3 .m3-cb .m3-key { color: var(--ink); }
#modal.area .m3 .m3-kd { opacity: 0.8; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#modal.area .m3 .m3-key { flex: none; min-width: 14px; padding: 0 2px; text-align: center; background: #fff; border: 1px solid var(--ink); border-radius: 4px; line-height: 1; }
#modal.area .m3 .m3-rw { flex: none; white-space: nowrap; background: var(--ink); padding: 0 4px; border-radius: 6px; }
#modal.area .m3 .m3-ch { display: flex; gap: 7px; align-items: center; padding: 3px 6px 1px; flex: none; min-width: 0; }
#modal.area .m3 .m3-new { padding: 0 3px; flex: none; line-height: 1.05; background: #ff3a6a; color: #fff; border-radius: 8px; border: 2px solid var(--ink); }
#modal.area .m3 .m3-ch .m3-new { margin-left: auto; }
#modal.area .m3 .m3-ci { width: 38px; height: 38px; display: grid; place-items: center; flex: none; background: #fff; border-radius: 8px; border: 2px solid var(--ink); overflow: hidden; }
#modal.area .m3 .m3-ci .pk3 { width: 32px; height: 32px; display: block; }
#modal.area .m3 .m3-ci .comp-pic { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; display: block; }
/* a name takes a second line before it is cut */
#modal.area .m3 .m3-nm { display: block; min-width: 0; line-height: 1.05; hyphens: manual; }
#modal.area .m3 .m3-nm > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
#modal.area .m3-gus.m3-ov > :is(.m3-tabs, .m3-gh, .m3-cds) { visibility: hidden; }
#modal.area .m3 .m3-rb { flex: 1; min-height: 0; padding: 2px 6px 4px; overflow: hidden; overflow-wrap: break-word; }
#modal.area .m3 .m3-rb .m3-flt { float: right; width: 0; height: calc(100% - 24px); }
#modal.area .m3 .m3-buy { float: right; clear: right; margin: 2px 0 0 6px; height: 24px; padding: 0 7px; white-space: nowrap; pointer-events: auto;
  background: var(--grn); color: #fff; border: 2px solid var(--ink); border-radius: 9px; box-shadow: 0 2px 0 var(--ink); text-shadow: 1px 1px 0 var(--ink); }
#modal.area .m3 .m3-buy > span { display: block; overflow: hidden; text-overflow: ellipsis; }
#modal.area .m3 .m3-buy:not(:disabled):hover { filter: brightness(1.1); }
#modal.area .m3 .m3-buy:not(:disabled):active { translate: 0 1px; box-shadow: 0 1px 0 var(--ink); }
#modal.area .m3 .m3-buy.m3-poor { background: #ff6a8a; }
#modal.area .m3 .m3-buy.m3-cancel { background: var(--gold); color: var(--ink); text-shadow: none; }
#modal.area .m3 .m3-buy.m3-done { background: var(--dash); text-shadow: none; color: var(--ink); }
#modal.area .m3 .m3-cd:is(.m3-s-bought, .m3-s-held, .m3-s-off) { opacity: 0.7; }
#modal.area .m3 .m3-cd.m3-s-fitting { box-shadow: 0 0 0 3px var(--gold), 0 4px 0 var(--ink); }
#modal.area .m3 .m3-rt, #modal.area .m3 .m3-rc { overflow-wrap: break-word; }
#modal.area .m3 .m3-rc { color: var(--red); }
#modal.area .m3 .m3-rx { color: #2c8cff; }
/* compact: a card too short for its rule shows its picture, name and BUY in one row (its rule in its read) */
#modal.area .m3 :is(.m3-cds, .m3-cprow).m3-compact .m3-cd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: 'cb cb cb' 'ci nm buy'; align-items: center; column-gap: 6px; }
#modal.area .m3 :is(.m3-cds, .m3-cprow).m3-compact :is(.m3-ch, .m3-rb) { display: contents; }
#modal.area .m3 :is(.m3-cds, .m3-cprow).m3-compact .m3-cb { grid-area: cb; }
#modal.area .m3 :is(.m3-cds, .m3-cprow).m3-compact .m3-ci { grid-area: ci; margin-left: 5px; width: 36px; height: 36px; }
#modal.area .m3 :is(.m3-cds, .m3-cprow).m3-compact .m3-ci :is(.pk3, .comp-pic) { width: 30px; height: 30px; }
#modal.area .m3 :is(.m3-cds, .m3-cprow).m3-compact .m3-nm { grid-area: nm; max-width: 100%; text-align: left; }
#modal.area .m3 :is(.m3-cds, .m3-cprow).m3-compact .m3-buy { grid-area: buy; float: none; margin: 0 5px 0 0; position: relative; z-index: 2; transform: none; max-width: var(--bmax, 40%); overflow: hidden; }
#modal.area .m3 :is(.m3-cds, .m3-cprow).m3-compact :is(.m3-rt, .m3-rc, .m3-rx, .m3-flt, .m3-new) { display: none; }
#modal.area .m3 .m3-cd.m3-noic .m3-ci { display: none; }
#modal.area .m3 .m3-cd.m3-newi .m3-ch { position: relative; }
#modal.area .m3 .m3-cd.m3-newi .m3-ch .m3-new { position: absolute; left: 3px; top: 0; margin: 0; }
#modal.area .m3 :is(.m3-cds, .m3-cprow).m3-compact .m3-cd.m3-noic .m3-nm { grid-column: 1 / 3; margin-left: 6px; }
/* side: a card too short for its rule under its name stands its picture at its left, its name and rule beside it, the
   rule wrapping round BUY at the bottom right as on a full card (stock() in market3.js) */
#modal.area .m3 .m3-cds.m3-side .m3-cd { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas: 'cb cb cb' 'ci nm new' 'ci rb rb'; column-gap: 6px; }
#modal.area .m3 .m3-cds.m3-side .m3-ch { display: contents; }
#modal.area .m3 .m3-cds.m3-side .m3-cb { grid-area: cb; }
#modal.area .m3 .m3-cds.m3-side .m3-ci { grid-area: ci; align-self: start; margin: 4px 0 0 6px; }
#modal.area .m3 .m3-cds.m3-side .m3-nm { grid-area: nm; padding-top: 3px; }
#modal.area .m3 .m3-cds.m3-side .m3-new { grid-area: new; align-self: start; margin: 3px 6px 0 0; }
#modal.area .m3 .m3-cds.m3-side .m3-rb { grid-area: rb; padding: 1px 6px 4px 0; }
#modal.area .m3 .m3-cds.m3-side .m3-cd.m3-noic { grid-template-areas: 'cb cb cb' 'nm nm new' 'rb rb rb'; }
#modal.area .m3 .m3-cds.m3-side .m3-cd.m3-noic :is(.m3-nm, .m3-rb) { padding-left: 6px; }
#modal.area .m3 .m3-cds.m3-side .m3-cd.m3-newi .m3-new { grid-area: ci; position: relative; left: 2px; top: 2px; justify-self: start; margin: 0; z-index: 2; }
#modal.area .m3-act { display: flex; gap: 6px; align-items: center; flex: none; min-width: 0; }
#modal.area .m3 .m3-act .m3-btn { height: 28px; padding: 0 9px; white-space: nowrap; overflow: hidden; background: #fff; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 3px 0 var(--ink); flex: 0 1 auto; min-width: 0; }
#modal.area .m3 .m3-act .m3-btn > span { display: block; overflow: hidden; text-overflow: ellipsis; }
#modal.area .m3 .m3-act .m3-btn:not(:disabled):hover { filter: brightness(1.06); }
#modal.area .m3 .m3-act .m3-btn:not(:disabled):active { translate: 0 2px; box-shadow: 0 1px 0 var(--ink); }
#modal.area .m3 .m3-act .m3-btn:disabled { opacity: 0.6; }
#modal.area .m3 .m3-act .m3-rr { background: #2cc0ff; color: #fff; text-shadow: 1px 1px 0 var(--ink); }
#modal.area .m3 .m3-act .m3-ret { color: var(--red); }
#modal.area .m3 .m3-act .m3-start { background: var(--grn); color: #fff; text-shadow: 1px 1px 0 var(--ink); }

/* ---------- papers over the stock: a step's choices, the tray ---------- */
#modal.area .m3 .m3-over { position: absolute; left: 2px; right: 6px; top: 6px; bottom: 44px; z-index: 10; display: flex; flex-direction: column; gap: 4px; padding: 6px 8px;
  background: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); min-height: 0; }
#modal.area .m3 .m3-over .m3-x { background: var(--lav); color: var(--ink); }
#modal.area .m3 .m3-ptitle { color: var(--vio); }
#modal.area .m3 .m3-over .m3-hint { color: #6a5a90; opacity: 1; }
#modal.area .m3 .m3-pgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-auto-rows: 28px; gap: 5px; align-content: start; overflow: hidden; }
#modal.area .m3 .m3-pb { padding: 0 6px; white-space: nowrap; overflow: hidden; background: var(--lav); border: 2px solid var(--ink); border-radius: 9px; box-shadow: 0 2px 0 var(--ink); }
#modal.area .m3 .m3-pb > span { display: block; overflow: hidden; text-overflow: ellipsis; }
#modal.area .m3 .m3-pb:hover { background: #fff3a8; }
#modal.area .m3 .m3-pback { align-self: flex-end; height: 26px; padding: 0 10px; color: var(--ink); background: var(--lav); border: 2px solid var(--ink); border-radius: 9px; box-shadow: 0 2px 0 var(--ink); }
#modal.area .m3 .m3-felt { background: #1e7a4c; color: #fff; }
#modal.area .m3 .m3-felt .m3-ptitle { color: var(--gold); }
#modal.area .m3 .m3-felt .m3-hint { color: #cfe8d8; }
#modal.area .m3 .m3-tgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--tcol), minmax(0, 1fr)); grid-template-rows: repeat(var(--trow), minmax(0, 1fr)); gap: 5px; }
#modal.area .m3 .m3-tcell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 0; min-width: 0; }
#modal.area .m3 .m3-tpic { position: relative; flex: 1; min-height: 0; width: 100%; display: block; pointer-events: auto; }
#modal.area .m3 :is(.m3-tpic, .m3-tc, .m3-pv) > .cardpic { position: relative; overflow: hidden; }
#modal.area .m3 :is(.m3-tpic, .m3-tc, .m3-pv) .card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#modal.area .m3 .m3-tpic > :not(.m3-new) { width: 100% !important; height: 100% !important; display: block; margin: 0; }
#modal.area .m3 .m3-tpic img { object-fit: cover; }
#modal.area .m3 .m3-tpic .m3-new { position: absolute; right: -3px; top: -3px; }
#modal.area .m3 .m3-thome { max-width: 100%; color: #cfe8d8; }
#modal.area .m3 :is(.m3-tsell, .m3-tslv, .m3-tmode, .m3-tall2) { height: 22px; padding: 0 6px; white-space: nowrap; overflow: hidden; max-width: 100%; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 2px 0 #0a3a20; }
#modal.area .m3 .m3-tsell { background: var(--grn); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
#modal.area .m3 .m3-tslv { background: #fff; color: var(--ink); }
#modal.area .m3 .m3-tslv:disabled { opacity: 0.5; }
#modal.area .m3 .m3-tmode { background: #fff; color: var(--ink); } #modal.area .m3 .m3-tmode.m3-on { background: var(--gold); }
#modal.area .m3 .m3-tall2 { background: var(--gold); color: var(--ink); }
#modal.area .m3 .m3-tfoot { gap: 6px; }
#modal.area .m3 .m3-tfoot .m3-pback { align-self: center; height: 22px; color: var(--ink); }

/* ---------- the bubble: what is read, beside the thing tapped ---------- */
#modal.area .m3 .m3-bub { position: absolute; z-index: 30; width: 236px; max-height: calc(100% - 12px); display: flex; flex-direction: column; gap: 3px; padding: 5px 7px 6px;
  background: var(--ink); color: #fff; border-radius: 10px; box-shadow: 0 4px 0 #120a2a, 0 0 0 2px #fff; overflow: hidden; }
#modal.area .m3 .m3-bub .m3-arr { position: absolute; left: -7px; top: var(--ay, 20px); width: 0; height: 0; margin-top: -7px; border: 7px solid transparent; border-left: 0; border-right-color: var(--ink); pointer-events: none; }
#modal.area .m3 .m3-bub.m3-bub-r .m3-arr { left: auto; right: -7px; border-right: 0; border-left: 7px solid var(--ink); }
#modal.area .m3 .m3-bub .m3-name { flex: 1; color: var(--gold); white-space: normal; hyphens: manual; }
#modal.area .m3 .m3-bub .m3-name > span { display: block; }
#modal.area .m3 .m3-bub .m3-w { --lines: 40; }
#modal.area .m3 .m3-sf { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; }
#modal.area .m3 .m3-sb { display: flex; gap: 4px; margin-top: 2px; }
#modal.area .m3 .m3-cbtn { flex-basis: 0; height: 24px; padding: 0 6px; white-space: nowrap; overflow: hidden; background: #fff; color: var(--ink); border: 2px solid #120a2a; border-radius: 8px; box-shadow: 0 2px 0 #120a2a; }
#modal.area .m3 .m3-cbtn > span { display: block; overflow: hidden; text-overflow: ellipsis; }
#modal.area .m3 .m3-cbtn.m3-go { background: var(--grn); color: #fff; text-shadow: 1px 1px 0 var(--ink); }
#modal.area .m3 .m3-cbtn.m3-wine { background: #ff6a8a; color: #fff; text-shadow: 1px 1px 0 var(--ink); }
#modal.area .m3 .m3-cbtn:disabled { opacity: 0.45; }
#modal.area .m3 .m3-spv { display: flex; gap: 2px; flex-wrap: wrap; }
#modal.area .m3 .m3-pv { width: 23px; height: 32px; display: block; overflow: hidden; border-radius: 2px; }
#modal.area .m3 .m3-pv > * { width: 100% !important; height: 100% !important; display: block; margin: 0; }
#modal.area .m3 .m3-pv.m3-pvstar { box-shadow: 0 0 0 2px var(--gold); }
#modal.area .m3 .m3-pv.m3-pvblank { background: #4a3a80; }

/* ---------- a tall screen (4:3): the same zones, larger pieces ---------- */
#modal.area .m3-tall .m3-gp { width: 44px; height: 44px; }
#modal.area .m3-tall .m3-gh { min-height: 50px; }
/* a card with the height stands as a shop tile, on any screen: its picture at twice its size over its name, its rule
   centred under it at a reading width, BUY at its foot */
#modal.area .m3 .m3-cds.m3-tile .m3-ch { flex-direction: column; gap: 3px; padding: 6px 6px 2px; }
#modal.area .m3 .m3-cds.m3-tile .m3-ci { width: 74px; height: 74px; }
#modal.area .m3 .m3-cds.m3-tile .m3-ci .pk3, #modal.area .m3 .m3-cds.m3-tile .m3-ci .comp-pic { width: 64px; height: 64px; }
#modal.area .m3 .m3-cds.m3-tile .m3-ch .m3-new { position: absolute; right: 6px; top: 6px; margin: 0; }
#modal.area .m3 .m3-cds.m3-tile .m3-ch .m3-nm { max-width: 100%; }
#modal.area .m3 .m3-cds.m3-tile .m3-rb { text-align: center; padding-bottom: 34px; width: 100%; max-width: 360px; align-self: center; }
#modal.area .m3 .m3-cds.m3-tile .m3-rb .m3-flt { display: none; }
#modal.area .m3 .m3-cds.m3-tile .m3-rb .m3-buy { float: none; display: block; margin: 0; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); }
#modal.area .m3 .m3-cds.m3-tile .m3-rb .m3-buy:not(:disabled):active { translate: 0 1px; }

/* ---------- a phone held sideways: your panel in two columns, no Gus's line ---------- */
#modal.area .m3-ph .m3-me { grid-template-columns: minmax(0, 1fr) 134px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'mh mh' 'c1 c2'; align-items: stretch; }
#modal.area .m3-ph .m3-c1, #modal.area .m3-ph .m3-c2 { display: flex; flex-direction: column; justify-content: space-between; gap: 3px; min-width: 0; min-height: 0; }
#modal.area .m3-ph .m3-c1 { grid-area: c1; } #modal.area .m3-ph .m3-c2 { grid-area: c2; }
#modal.area .m3-ph .m3-mn { gap: 3px; } #modal.area .m3-ph .m3-mn > span { padding: 0 3px; } #modal.area .m3-ph .m3-mn em { margin-right: 3px; }
#modal.area .m3-ph .m3-zb .m3-zr { gap: 2px; }
#modal.area .m3-ph .m3-zd .m3-zr { flex-direction: column; align-items: stretch; gap: 3px; }
#modal.area .m3-ph .m3-zp .m3-zr { flex-wrap: wrap; gap: 3px 2px; }
#modal.area .m3-ph .m3-gh:not(.m3-fit) { display: none; }
#modal.area .m3-ph .m3-cds { gap: 5px; }
#modal.area .m3-ph .m3-cb { padding-top: 1px; padding-bottom: 1px; } #modal.area .m3-ph .m3-ch { padding: 1px 5px 0; } #modal.area .m3-ph .m3-rb { padding: 1px 5px 3px; }

/* pointing at an item: what it does, the way a game's tooltip says it (ui.showTip, data-tip-item) */
#tip.mc { background: rgba(16, 4, 20, 0.96); color: #e8e2f0; border: calc(var(--u) * 1) solid #120418; border-radius: 0;
  box-shadow: inset 0 0 0 calc(var(--u) * 0.6) #4d1fa8, inset 0 0 0 calc(var(--u) * 1.2) #24104e; padding: calc(var(--u) * 3) calc(var(--u) * 5) calc(var(--u) * 4);
  white-space: normal; max-width: calc(var(--u) * 170); text-shadow: calc(var(--u) * 0.6) calc(var(--u) * 0.6) 0 #3a3446; }
#tip.mc > span, #tip.mc > b { display: block; }
#tip.mc .tk { color: #9a92a8; }
#tip.mc .tr { margin-top: calc(var(--u) * 2); }
#tip.mc .tc { color: #ff6a5e; margin-top: calc(var(--u) * 1.5); }
#tip.mc .tp { color: #8fd8ff; margin-top: calc(var(--u) * 2); }
#tip.mc .tw { color: #ffd66b; margin-top: calc(var(--u) * 2); }
#tip.mc .tg { color: #b7aec8; } #tip.mc .tg1 { margin-top: calc(var(--u) * 2); } /* the item words its rule uses (GLOSS) */
#tip.mc > :first-child { margin-top: 0; }

/* ---------- a pack read large over Gus's side, as a game shows an enchanted item (market3.js packView) ---------- */
#modal.area .m3 .m3-over.m3-ench { background: rgba(16, 4, 20, 0.97); color: #e8e2f0; border: 3px solid #120418; border-radius: 4px; gap: 6px;
  box-shadow: inset 0 0 0 2px #4d1fa8, inset 0 0 0 4px #24104e, 0 4px 0 var(--ink); padding: 8px 10px; }
#modal.area .m3 .m3-ench .m3-x { background: rgba(255,255,255,0.12); color: #fff; }
#modal.area .m3 .m3-ench .m3-etitle { color: #7ff0ff; }
#modal.area .m3 .m3-ench .m3-hint { color: #a99fc0; opacity: 1; }
#modal.area .m3 .m3-eb { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
#modal.area .m3 .m3-epk { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; min-width: 0; }
#modal.area .m3 .m3-eart { position: relative; display: block; flex: none; }
#modal.area .m3 .m3-eart > .pk3 { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 6px rgba(140, 70, 255, 0.55)); }
#modal.area .m3 .m3-eprice { color: #ffe27a; }
#modal.area .m3 .m3-epk .m3-sb { align-self: stretch; }
/* the shimmer: a purple sheen sliding over the pack's own pixels (its stock image as the mask), one stripe's width a loop */
@keyframes m3Glint { to { transform: translateX(66.2px); } }
#modal.area .m3 .m3-eart .m3-glint { -webkit-mask: var(--pks) 0 0 / 100% 100% no-repeat; mask: var(--pks) 0 0 / 100% 100% no-repeat; overflow: hidden; mix-blend-mode: plus-lighter; }
#modal.area .m3 .m3-eart .m3-glint > i { position: absolute; top: 0; bottom: 0; left: -68px; right: 0; width: auto; height: auto;
  background: repeating-linear-gradient(115deg, rgba(110, 50, 255, 0.12) 0 18px, rgba(190, 120, 255, 0.55) 26px, rgba(110, 50, 255, 0.12) 34px 60px);
  animation: m3Glint 2.8s linear infinite; }
body:is(.calm, .fx-off) #modal.area .m3 .m3-eart .m3-glint > i { animation: none; }
/* each space: its kind's chip and name, then its whole rule; a curse in red, with its count and how it clears */
#modal.area .m3 .m3-ec { display: flex; flex-direction: column; gap: 4px; min-height: 0; min-width: 0; }
#modal.area .m3 .m3-el { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 7px; overflow: hidden; }
#modal.area .m3 .m3-er { flex: none; display: flex; flex-direction: column; gap: 1px; padding-left: 2px; border-left: 2px solid #4d1fa8; padding: 0 0 0 6px; }
#modal.area .m3 .m3-erh { display: flex; align-items: center; gap: 6px; min-width: 0; }
#modal.area .m3 .m3-en { color: #d8c8ff; min-width: 0; hyphens: manual; }
#modal.area .m3 .m3-erl { color: #aaa3b8; overflow-wrap: break-word; }
#modal.area .m3 .m3-er.m3-ecur { border-left-color: #a13338; }
#modal.area .m3 .m3-er.m3-ecur .m3-en, #modal.area .m3 .m3-ecl .m3-en { color: #ff7a7a; }
#modal.area .m3 .m3-ecl { margin-top: 3px; }
#modal.area .m3 .m3-ecr { color: #e8a0a0; }
#modal.area .m3 .m3-erc { color: #8f86a6; }
#modal.area .m3 .m3-er.m3-eem { border-left: 2px dashed #4a3a70; }
#modal.area .m3 .m3-er.m3-eem .m3-en { color: #8f86a6; }
#modal.area .m3 .m3-esp { flex: none; width: 10px; height: 10px; border: 2px dashed #6a5a90; border-radius: 3px; }
#modal.area .m3 .m3-epg { display: flex; align-items: center; gap: 8px; flex: none; }
#modal.area .m3 .m3-epg .m3-cbtn { flex: none; width: 34px; }
#modal.area .m3 .m3-epg .m3-t { flex: 1; text-align: center; }

/* ---------- the charm pick (market3.js charmHTML): the market's own pieces in a window ---------- */
/* a window over the dimmed game, wearing the night's cloth: its gradient drifts and its stripes scroll inside it. Inside
   it, the market's pieces as they are: the panel's head, Gus's strip (the one who offers them speaking), Gus's stock
   (.m3-cds .m3-cd, laid out and fitted by stock() and fit()) and the action row. */
#modal.area .m3.m3-cp { display: grid; place-items: center; background: rgba(12, 6, 36, 0.55); }
#modal.area .m3.m3-cp::before, #modal.area .m3.m3-cp::after { content: none; }
#modal.area .m3-cp > .m3-fi { display: flex; flex-direction: column; gap: 5px; padding: 6px; overflow: hidden; isolation: isolate;
  border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 6px 0 var(--ink), 0 12px 40px rgba(0, 0, 0, 0.5); }
#modal.area .m3-cp > .m3-fi::after { content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none; will-change: filter;
  background: linear-gradient(150deg, #7a3cff 0%, #4a5cff 45%, #2c8cff 75%, #22b0f0 100%); animation: m3Shift 14s ease-in-out infinite alternate; }
#modal.area .m3-cp > .m3-fi::before { content: ''; position: absolute; top: 0; bottom: 0; left: -52px; right: 0; z-index: -1; pointer-events: none; will-change: transform;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.07) 0 18px, transparent 18px 36px); animation: m3Stripes 2.6s linear infinite; }
body:is(.calm, .fx-off) #modal.area .m3-cp > .m3-fi::before, body:is(.calm, .fx-off) #modal.area .m3-cp > .m3-fi::after { animation: none; }
#modal.area .m3-cp > .m3-fi > * { position: relative; z-index: 2; }
/* the head: the panel's white card, its title where NIGHT N stands, the toolbar's plaques and the cash */
#modal.area .m3-cph { flex: none; display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 6px;
  background: #fff; border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); }
#modal.area .m3-cph .m3-nt { flex: 0 1 auto; }
#modal.area .m3-cph .m3-gap { min-width: 0; }
#modal.area .m3-cph .m3-mn { flex: none; }
#modal.area .m3-cpgold .m3-nt b { color: #d08a00; }
#modal.area .m3 .m3-cppk { background: var(--gold); }
#modal.area .m3 .m3-cppk b { margin-left: 2px; }
#modal.area .m3 .m3-cpg { background-color: #fff3c4; background-size: 70%; }
#modal.area .m3-cph .m3-gp { width: 28px; height: 28px; border: 2px solid var(--ink); }
/* the places: always one size (--cw by --ch), two rows deep, as many across as the window holds, centred; the empty
   ones a dashed outline on the cloth */
#modal.area .m3-cprow { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols), var(--cw)); grid-template-rows: repeat(var(--rows), var(--ch));
  justify-content: center; align-content: center; gap: 6px; }
#modal.area .m3 .m3-cpe { display: block; border: 3px dashed rgba(255, 255, 255, 0.35); border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
/* a charm's icon in the card's icon box, at twice its pixels */
#modal.area .m3 .m3-cpk .m3-ci .art { width: 32px; height: 32px; margin: 0; }
/* the action row: your charms on a white card, then Skip as Retire stands */
#modal.area .m3-cp .m3-act { gap: 8px; }
#modal.area .m3-cpo { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 6px;
  background: #fff; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 3px 0 var(--ink); }
#modal.area .m3-cpo h4 { flex: none; display: flex; gap: 6px; white-space: nowrap; margin: 0; }
#modal.area .m3-cpo h4 i { background: var(--vio); color: #fff; border-radius: 8px; padding: 0 5px; }
#modal.area .m3-cpos { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; overflow: hidden; }
#modal.area .m3 .m3-cpo1 { width: 28px; height: 28px; margin: 0; flex: none; border-bottom: 3px solid var(--fc); }
#modal.area .m3 .m3-cpo1 { position: relative; }
#modal.area .m3 .m3-cpn { position: absolute; right: -2px; bottom: -3px; padding: 0 2px; background: #1b1c30; color: #ffd66b; font-size: 10px; line-height: 10px; font-style: normal; }
#modal.area .m3 .m3-own { background: #ffd66b; color: #2a2010; }
#modal.area .m3 .m3-cpmore { flex: none; background: var(--vio); color: #fff; border-radius: 8px; padding: 0 5px; }
#modal.area .m3 .m3-cp .m3-act .m3-ret { height: 36px; padding: 0 16px; }

/* the Jackpot Pack at the cash cap (RunMode.buyJackpot) */
#modal.area .m3 .m3-btn.m3-rr.m3-jack { margin-left: 6px; color: #2a2010; background: linear-gradient(#ffe49a, #f2b33d); border-color: #8a5a10; text-shadow: none; }
#modal.area .m3 .m3-jw { margin-left: 6px; align-self: center; color: #ffd66b; white-space: nowrap; }
