/* =======================================================================
   LORECRAFT · TABLE
   The look of a game table, the Match's (partida.html, drawn by
   table.js): the bar with turn and phases, the areas, a card on the
   table with its marks, the piles, the Hand floating at the bottom, the menu,
   the big preview, the zone viewer, the log and the toast. The page keeps
   its own layout.
   ======================================================================= */
:root{--cw:100px; --cw-hand:calc(var(--cw) * 1.18); --ok:#2f7d4a; --warn:#b4541f; --hurt:#c62a1c}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){--ok:#5fc285; --warn:#f0a066; --hurt:#ff6b5e} }
:root[data-theme="dark"]{--ok:#5fc285; --warn:#f0a066; --hurt:#ff6b5e}
[hidden]{display:none !important}
body{min-height:100vh; display:flex; flex-direction:column}
/* while a game is on the page, nothing on it is selected: a click and a drag painted the cards, the names and the buttons blue (15/11/2026:
   "impedir de selecionar qualquer coisa"); the fields still are (the Report a bug window), and so is the card pinned with Space, to
   copy its text (16/11/2026) */
body:has(main.board:not([hidden])){-webkit-user-select:none; user-select:none}
body:has(main.board:not([hidden])) :is(input, textarea, [contenteditable], .card-zoom){-webkit-user-select:text; user-select:text}
button{font:500 14px/1 var(--sans); color:var(--fg); background:var(--chip); border:1px solid var(--line); border-radius:8px; padding:7px 10px; cursor:pointer; min-height:32px}
button:hover{border-color:var(--muted)}
button.primary{background:var(--fg); color:var(--bg); border-color:var(--fg); font-weight:700}
button:disabled{opacity:.45; cursor:default}
/* the button that takes the game on, when it is the player's move: a glow that breathes and a light that sweeps over it */
button.glow{position:relative; overflow:hidden; animation:glow 1.6s ease-in-out infinite}
button.glow::after{content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(105deg, transparent 32%, color-mix(in srgb, var(--accent) 60%, transparent) 50%, transparent 68%) 150% 0/250% 100% no-repeat;
  animation:shine 2.4s ease-in-out infinite}
@keyframes glow{50%{box-shadow:0 0 0 2px var(--accent), 0 0 22px 6px color-mix(in srgb, var(--accent) 80%, transparent)}}
@keyframes shine{60%, 100%{background-position:-50% 0}}
@media (prefers-reduced-motion: reduce){
  button.glow{animation:none; box-shadow:0 0 12px 3px color-mix(in srgb, var(--accent) 60%, transparent)}
  button.glow::after{display:none}
}
button:focus-visible, select:focus-visible, input:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
/* the fields; a slider, a checkbox and a radio stay as the browser draws them (10/11/2026: with the padding of a field, a slider at
   its end stopped short of it) */
select, input:not([type="range"], [type="checkbox"], [type="radio"]){font:400 14px/1.2 var(--sans); color:var(--fg); background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:6px 8px; min-height:32px}

/* ---------- the bar under the menu of the site: turn, phases and the page's buttons ---------- */
.bar{position:sticky; top:48px; z-index:6; display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center;
  padding:8px var(--gutter-r) 8px var(--gutter-l); background:var(--surface); border-bottom:1px solid var(--line)}
.bar .grp{display:flex; flex-wrap:wrap; gap:6px; align-items:center}
.bar .lbl{font:700 11px/1.2 var(--sans); letter-spacing:.12em; text-transform:uppercase; color:var(--muted)}
.phases{display:flex; flex-wrap:wrap; gap:2px}
.phases button, .phases span{min-height:0; padding:6px 8px; border:0; border-radius:6px; background:none; font:500 13px/1 var(--sans); color:var(--muted)}
.phases button:hover{color:var(--fg); background:var(--chip)}
.phases .now{background:var(--fg); color:var(--bg); font-weight:700}
.turn{font:700 15px/1 var(--sans); font-variant-numeric:tabular-nums}
.notice{flex-basis:100%; font-size:14px; color:var(--warn)}
.notice:empty{display:none}

/* ---------- an area of the table ---------- */
.zone{position:relative; flex:none; max-width:100%; border:1px solid var(--line); border-radius:10px; background:var(--surface); padding:8px; min-width:0; min-height:60px;
  display:flex; flex-direction:column; overflow:hidden; transition:box-shadow .2s ease-out}
/* the zone under the mouse: its outer edges with a faint glow of the palette, as if a light behind it (26/11/2026); not the Hand, which
   has its own shadow, and never over the glow of a zone a dragged card can go to (:where keeps it as light as .drop-here, which comes after) */
.zone:where(:not(.hand)):hover{box-shadow:0 0 18px 2px color-mix(in srgb, var(--accent) 45%, transparent)}
@media (prefers-reduced-motion: reduce){ .zone{transition:none} }
.zone > .zbody{flex:1 1 auto; min-height:0; overflow:auto}   /* the cards scroll under the title */
.zone > header{display:flex; align-items:center; gap:6px; margin-bottom:6px; min-height:24px; container-type:inline-size}
.zone > header h3{font:700 11px/1.2 var(--sans); letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin-right:auto}
.zone > header .n{font:700 13px/1 var(--sans); color:var(--fg); font-variant-numeric:tabular-nums}
.zone > header button{min-height:26px; padding:4px 8px; font-size:13px}
.zone .hint{color:var(--muted); font-size:13px; padding:4px 2px}
.row{display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; min-height:calc(var(--cw) * 88 / 63)}
.front .row{min-height:calc(var(--cw) * 1.6)}
.front .crafts, .front .summons{display:contents}   /* the Crafts first, then the Summons, each in the order they came in */
.piles{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px}
.pile{display:grid; gap:4px; justify-items:center; cursor:pointer; background:none; border:0; padding:0; min-height:0; color:var(--fg)}
.pile .stack{position:relative; width:var(--pw, var(--cw))}
/* in a grid of piles each pile fills its cell, and never grows wider than it in a narrow column */
.piles .pile{min-width:0; width:100%}
.piles .pile .stack, .piles .pile .empty{width:min(var(--pw, var(--cw)), 100%)}
.pile .stack .count{position:absolute; right:-6px; bottom:-6px; z-index:3; min-width:28px; padding:3px 7px; border-radius:999px; background:var(--fg); color:var(--bg); font:700 13px/1.2 var(--sans); text-align:center; font-variant-numeric:tabular-nums}
.pile small{font:700 11px/1.2 var(--sans); letter-spacing:.1em; text-transform:uppercase; color:var(--muted); text-align:center}
.pile .empty{display:grid; place-items:center; width:var(--pw, var(--cw)); aspect-ratio:63/88; border:1.5px dashed var(--line); border-radius:8px; color:var(--muted); font-size:12px}

/* ---------- a card on the table: the face, rotated when Engaged or Dazed, and its marks ---------- */
.pc{position:relative; flex:none; width:var(--w, var(--cw)); height:calc(var(--w, var(--cw)) * 88 / 63); cursor:pointer; border-radius:6px;
  --u:calc(var(--w, var(--cw)) / 100)}   /* 1px on a 100px card: the marks and the paid chips grow with the card */
.pc > .face{position:absolute; left:50%; top:50%; width:var(--w, var(--cw)); transform:translate(-50%, -50%); transition:transform .15s}
.pc.engaged{width:calc(var(--w, var(--cw)) * 88 / 63); height:var(--w, var(--cw))}
.pc.engaged > .face{transform:translate(-50%, -50%) rotate(90deg)}
/* a Dazed card takes the room its turned face takes, a square of (width + height) / √2: the next card goes to a new line, where before its
   corners went past the zone and the Front scrolled (11/11/2026) */
.pc.dazed{width:calc(var(--w, var(--cw)) * (1 + 88 / 63) * .70711); height:calc(var(--w, var(--cw)) * (1 + 88 / 63) * .70711)}
.pc.dazed > .face{transform:translate(-50%, -50%) rotate(-45deg)}
/* only the turned face takes the mouse, not the square it turns in: the corners of that square covered the Enchantment or Equipment
   attached behind the card, which could hardly be seen under the mouse (12/11/2026) */
.pc.dazed{pointer-events:none}
.pc.dazed > .face{pointer-events:auto}
.pc.selected > .face{outline:3px solid var(--accent); outline-offset:2px; border-radius:6px}
.pc:focus-visible{outline:2px solid var(--accent); outline-offset:3px}
.hand .pc{--w:var(--cw-hand)}
.market .pc{--w:calc(var(--cw) * .68)}   /* resources read by their color; the preview shows them big */
.market .pile{--pw:calc(var(--cw) * .68)}   /* the Supply, beside the Market it refills */
/* the Stash: one face-up pile per resource, with the count and a note */
.res-group{position:relative; display:grid; justify-items:center; gap:3px}
.res-group > .count{position:absolute; right:-6px; top:-6px; z-index:5; min-width:28px; padding:3px 7px; border-radius:999px; background:var(--fg); color:var(--bg); font:700 13px/1.2 var(--sans); text-align:center; font-variant-numeric:tabular-nums; pointer-events:none}
.res-group > small{max-width:var(--cw); color:var(--muted); font-size:11px; line-height:1.2; text-align:center}
.marks{position:absolute; left:2px; right:2px; bottom:2px; z-index:4; display:flex; flex-wrap:wrap; gap:calc(var(--u, 1px) * 3); justify-content:center; pointer-events:none}
.mk{display:inline-flex; align-items:center; gap:.3em; padding:.18em .55em; border-radius:999px; background:var(--fg); color:var(--bg); font:700 max(10px, calc(var(--u, 1px) * 11))/1.2 var(--sans); font-variant-numeric:tabular-nums; box-shadow:0 1px 4px rgba(0,0,0,.4)}
/* a token (27/11/2026: "use também o ícone da habilidade e cores que combinem"): the icon of what puts it, its name and, when it adds up,
   how many in a dark round; a gem in the colors of what puts it (--a light, --b dark, --ring its edge), only colors of color-identity.css */
.mk.tk{--a:var(--arcane-fa); --b:var(--shadow-fa); --ring:color-mix(in srgb, var(--shadow-panel) 45%, transparent);
  gap:.28em; padding:.16em .5em .16em .32em; border:1px solid var(--ring); color:var(--shadow-panel);
  background:linear-gradient(160deg, var(--a), var(--b)); letter-spacing:.02em; text-shadow:0 1px 1px rgb(0 0 0 / .55);
  box-shadow:0 1px 5px rgb(0 0 0 / .45), inset 0 1px 0 color-mix(in srgb, var(--shadow-panel) 30%, transparent)}
.mk.tk .term{color:inherit; text-decoration:none}   /* the name a term of the Rules (terms.js): as the chip writes it */
/* a chip takes the pointer, for its meaning on hover (shared/terms.js): on the table and on the card opened big, never on the preview
   beside the card under the mouse, which lets the pointer through */
.mk.tk{pointer-events:auto; cursor:help}
.preview:not(.card-zoom) .mk.tk{pointer-events:none}
.mk.tk > svg{flex:none; height:1.25em; width:auto; max-width:1.5em; filter:drop-shadow(0 1px 1px rgb(0 0 0 / .5))}
.mk.tk > b{min-width:1.35em; padding:0 .32em; border-radius:999px; background:rgb(0 0 0 / .38); text-align:center; font-size:.95em}
.mk.tk.freeze{--a:var(--frost-fb); --b:var(--frost-fa); --ring:var(--frost-panel); color:var(--frost-panel)}
.mk.tk.poison{--a:var(--nature-hi); --b:var(--nature-fa); --ring:color-mix(in srgb, var(--nature-hi) 55%, var(--nature-panel)); color:var(--nature-panel)}
.mk.tk.burning{--a:var(--fire-fb); --b:var(--fire-fa); --ring:var(--fire-panel); color:var(--fire-panel)}
.mk.tk.plague{--a:var(--shadow-hi); --b:var(--shadow-fa); --ring:color-mix(in srgb, var(--shadow-hi) 55%, var(--shadow-panel))}
.mk.tk.infect{--a:color-mix(in srgb, var(--nature-hi) 50%, var(--shadow-fb)); --b:var(--shadow-fa); --ring:var(--nature-hi); color:var(--nature-panel)}
.mk.tk.stealth{--a:color-mix(in srgb, var(--arcane-fb) 60%, var(--shadow-fb)); --b:var(--shadow-fa); --ring:color-mix(in srgb, var(--arcane-panel) 50%, transparent); color:var(--arcane-panel)}
.mk.tk.growth{--a:var(--nature-hi); --b:var(--nature-fa); --ring:var(--nature-panel); color:var(--nature-panel)}
.mk.tk.aegis{--a:var(--light-fb); --b:var(--light-fa); --ring:var(--light-panel); color:var(--light-ink); text-shadow:none}
.mk.tk.soul{--a:var(--shadow-fb); --b:var(--shadow-fa); --ring:var(--shadow-hi)}
.mk.tk.volt{--a:var(--energy-fb); --b:var(--energy-fa); --ring:var(--energy-panel); color:var(--energy-ink); text-shadow:none}
.mk.tk.sip, .mk.tk.time{--a:var(--arcane-hi); --b:var(--arcane-fa); --ring:var(--arcane-panel); color:var(--arcane-panel)}
.mk.dmg{border-radius:5px; background:#f5f2ea; color:#17151b; border:1.5px solid #17151b}
.mk.sealed{background:var(--gold); color:#17151b}
/* yours face down in Stealth (27/11/2026): the others see its back; you see it, a little veiled */
.mk.veiled{background:var(--shadow-fb); color:var(--shadow-panel); border:1px dashed color-mix(in srgb, var(--shadow-panel) 55%, transparent)}
.pc.veiled > .face{filter:saturate(.75) brightness(.92)}
/* a Summon with a Stealth token: a light smoke drifts over it, two veils that cross (27/11/2026: "um efeito leve de fumacinha") */
.pc.stealthy > .face::before, .pc.stealthy > .face::after{content:""; position:absolute; inset:-5% -7%; z-index:3; pointer-events:none; border-radius:14%;
  background:radial-gradient(44% 30% at 26% 84%, color-mix(in srgb, var(--shadow-fb) 55%, transparent), transparent 70%),
    radial-gradient(38% 26% at 74% 70%, color-mix(in srgb, var(--arcane-fb) 45%, transparent), transparent 70%),
    radial-gradient(50% 34% at 50% 38%, color-mix(in srgb, var(--shadow-panel) 30%, transparent), transparent 72%),
    radial-gradient(30% 22% at 20% 30%, color-mix(in srgb, var(--arcane-panel) 28%, transparent), transparent 70%);
  filter:blur(6px); animation:stealth-smoke 8s ease-in-out infinite}
.pc.stealthy > .face::after{transform:scaleX(-1); animation-duration:11s; animation-delay:-4s}
@keyframes stealth-smoke{
  0%, 100%{opacity:.55; translate:-2% 5%; scale:1}
  50%{opacity:.9; translate:2% -5%; scale:1.08}
}
@media (prefers-reduced-motion:reduce){ .pc.stealthy > .face::before, .pc.stealthy > .face::after{animation:none; opacity:.5} }
.prog{position:absolute; left:0; right:0; top:34%; z-index:4; display:flex; flex-wrap:wrap; gap:calc(var(--u, 1px) * 2); justify-content:center; pointer-events:none}
.prog span{display:inline-flex; align-items:center; gap:.2em; padding:.1em .45em .1em .18em; border-radius:999px; background:rgba(15,12,20,.82); color:#fff; font:700 max(10px, calc(var(--u, 1px) * 11))/1.2 var(--sans); font-variant-numeric:tabular-nums}
.prog span.full{background:var(--ok)}
.prog .mini{width:1.36em; height:1.36em; margin:0}
.done{position:absolute; left:50%; top:46%; transform:translateX(-50%); z-index:4; padding:.25em .65em; border-radius:999px; background:var(--ok); color:#fff; font:700 max(10px, calc(var(--u, 1px) * 12))/1.2 var(--sans); pointer-events:none; white-space:nowrap}

/* a card of the Hand dragged (12/11/2026): it follows the pointer, the zones it can go to glow, the one under it more */
.pc.dragging{opacity:.35}
.drag-ghost{position:fixed; z-index:60; pointer-events:none; translate:-50% -50%; rotate:-4deg; filter:drop-shadow(0 14px 26px rgb(0 0 0 / .55))}
[data-area].drop-here{outline:3px solid var(--ok); outline-offset:-3px; box-shadow:inset 0 0 26px color-mix(in srgb, var(--ok) 45%, transparent); animation:drop-glow .9s ease-in-out infinite alternate}
[data-area].drop-over{background-color:color-mix(in srgb, var(--ok) 16%, transparent)}
@keyframes drop-glow{to{box-shadow:inset 0 0 44px color-mix(in srgb, var(--ok) 70%, transparent)}}
@media (prefers-reduced-motion:reduce){ [data-area].drop-here{animation:none} }
/* the Hand steps down out of the way while one of its cards is dragged, and lets the zones under it take the drop */
.drag-card .hand{pointer-events:none}
.drag-card .hand .hand-body{height:calc(var(--hand-h) * .15)}

/* a card attached to another (Enchantment, Equipment) peeks out behind it */
.grp{display:flex; align-items:flex-start; padding-top:14px}
.grp > .pc.att{margin-right:calc(var(--w, var(--cw)) * -0.8); transform:translateY(-14px)}
.grp > .pc:last-child{z-index:1}

/* the Lore of the Market and of a Stash: its card, with how many (a res-group) */
.lore{cursor:pointer}

/* ---------- the Hand: a box floating at the bottom, as wide as its cards; it drops to 15% of its height
   when the mouse is elsewhere, and opens again under the mouse or a dragged card (.open) ---------- */
.hand{--hand-h:calc(var(--cw-hand) * 88 / 63 + 6px);
  position:fixed; left:50%; bottom:0; transform:translateX(-50%); z-index:15; width:max-content; min-width:240px;
  max-width:calc(100vw - var(--gutter-l) - var(--gutter-r)); resize:none; overflow:visible; min-height:0;
  padding:6px 10px 8px; border-bottom:0; border-radius:12px 12px 0 0;
  background:color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); box-shadow:0 -8px 26px rgba(0,0,0,.35)}
.hand > header{margin-bottom:4px}
.hand-body{position:relative; height:var(--hand-h); overflow:hidden; transition:height .14s ease-out}
.hand:not(:hover):not(.open):not(:has(:focus-visible)) .hand-body{height:calc(var(--hand-h) * .15)}
@media (prefers-reduced-motion: reduce){ .hand-body{transition:none} }
.hand .row{flex-wrap:nowrap; height:100%; min-height:0; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; padding:0 2px}
.hand .row::-webkit-scrollbar{display:none}
.hand .row > :first-child{margin-left:auto}   /* centered, and a long Hand still scrolls from its first card */
.hand .row > :last-child{margin-right:auto}
/* « and »: scroll a Hand wider than the screen */
.hand .scroll{position:absolute; top:50%; z-index:6; transform:translateY(-50%); width:34px; height:56px; min-height:0; padding:0; border-radius:10px;
  background:color-mix(in srgb, var(--fg) 82%, transparent); color:var(--bg); border:0; font:700 20px/1 var(--sans); box-shadow:0 4px 14px rgba(0,0,0,.4)}
.hand .scroll.left{left:2px}
.hand .scroll.right{right:2px}
.hand:not(:hover):not(.open) .scroll{display:none}
/* the table leaves room under it for the closed Hand (--hand-room: the side column of the app ends above it too) */
:root{--hand-room:84px}
body{padding-bottom:var(--hand-room)}

/* ---------- menu, preview, zone viewer, log, toast ---------- */
.menu{position:fixed; z-index:30; min-width:220px; max-width:300px; max-height:80vh; overflow:auto; padding:6px; border-radius:10px; background:var(--surface); border:1px solid var(--line); box-shadow:0 12px 30px rgba(0,0,0,.35)}
.menu h4{font:700 11px/1.2 var(--sans); letter-spacing:.1em; text-transform:uppercase; color:var(--muted); padding:8px 8px 4px}
.menu button{display:block; width:100%; text-align:left; background:none; border:0; border-radius:6px; padding:7px 8px; min-height:30px}
.menu button:hover, .menu button:focus-visible{background:var(--chip)}
.menu .inline{display:flex; gap:4px; align-items:center; padding:2px 8px}
.menu .inline span{flex:1; font-size:14px}
.menu .inline button{width:auto; min-width:30px; text-align:center; border:1px solid var(--line); padding:4px 8px}
.menu p{padding:6px 8px; color:var(--muted); font-size:13px}
.menu button:disabled{color:var(--muted); cursor:default; font-size:13px}   /* what the card could do, but not now, and why */
.menu button:disabled:hover{background:none}
/* under the big card: the resources paid on a Craft and the marks, in the flow instead of over the card */
.preview .status{display:grid; gap:6px; padding:8px 10px; border-radius:10px; background:color-mix(in srgb, var(--surface) 94%, transparent); border:1px solid var(--line)}
.preview .status p{font:700 11px/1.2 var(--sans); letter-spacing:.1em; text-transform:uppercase; color:var(--muted)}
.preview .status .marks{position:static; justify-content:flex-start}
.preview .status .mk{font-size:14px; padding:3px 9px}
/* a Summon from its printed card to now (T.changes): the current Attack and Health big, the printed ones crossed out, a line for each
   thing that changes it and the damage last */
.status .changes .now{display:flex; gap:18px; margin:0; font:600 12px/1.2 var(--sans); letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
.status .changes .now b{margin-left:5px; font:800 24px/1 var(--sans); letter-spacing:0; color:var(--fg); font-variant-numeric:tabular-nums}
.status .changes .now s{margin-left:6px; font:600 15px/1 var(--sans); letter-spacing:0; color:var(--muted)}
.status .changes .now small{margin-left:5px; font:500 13px/1 var(--sans); letter-spacing:0; text-transform:none}
.status .changes .up{color:var(--ok)}
.status .changes .down, .status .changes .hurt b{color:var(--hurt)}
.status .changes ul{display:grid; gap:3px; margin:8px 0 0; padding:0; list-style:none}
.status .changes li{display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; padding:5px 8px; border-radius:8px; background:var(--chip); font-size:14px}
.status .changes li > span{margin-right:auto; font-weight:600}
.status .changes li > b{font-variant-numeric:tabular-nums}
.paid{display:grid; gap:4px; margin:0; padding:0; list-style:none}
.paid li{display:grid; grid-template-columns:30px 1fr auto; gap:8px; align-items:center; padding:4px 8px 4px 4px; border-radius:8px; background:var(--chip); font:500 16px/1.2 var(--sans)}
.paid li b{font:700 20px/1 var(--sans); font-variant-numeric:tabular-nums}
.paid li.full{background:color-mix(in srgb, var(--ok) 22%, var(--chip))}
.paid li.full b{color:var(--ok)}
.paid .mini{width:30px; height:30px; margin:0}
.paid .mini svg{width:62%; height:62%}
.paid .mini.split{background:var(--token-bg)}
.paid .mini.split svg{width:100%; height:100%}   /* generic and alternative paint their own quarters */
.paid-done{justify-self:start; padding:4px 12px; border-radius:999px; background:var(--ok); color:#fff; font:700 15px/1.2 var(--sans)}
dialog{position:fixed; top:110px; z-index:20; margin:0 auto; width:min(1100px, 94vw); max-height:62vh; overflow:auto; padding:0; box-shadow:0 18px 40px rgba(0,0,0,.4); border:1px solid var(--line); border-radius:12px; background:var(--bg); color:var(--fg)}
dialog::backdrop{background:rgba(10,8,16,.6)}
dialog header{position:sticky; top:0; z-index:2; display:flex; gap:10px; align-items:center; padding:12px 16px; background:var(--surface); border-bottom:1px solid var(--line)}
dialog header h2{font:700 20px/1.2 var(--display); margin-right:auto}
dialog .row{padding:16px; gap:12px}
/* paying a Cast: the lines of the cost in order, the one being paid marked, the ones left unpaid (what costs less: the player picks
   them) dashed; the Stash below, what pays it blinking */
#pay .slots{display:flex; flex-wrap:wrap; gap:8px; padding:12px 16px 0}
#pay .slot{display:inline-flex; align-items:center; gap:6px; padding:4px 10px 4px 4px; border:1px solid var(--line); border-radius:999px; font:600 14px/1 var(--sans)}
#pay .slot .token{--size:24px}
#pay .slot.now{outline:3px solid var(--fire-hi); outline-offset:1px}
#pay .slot.full{background:var(--chip)}
#pay .slot.free{border-style:dashed; color:var(--muted)}
#pay .slot.free .token{opacity:.45}
#pay .slot.pick{cursor:pointer}
#pay .slot.pick:hover{border-color:var(--fg)}
.res-group.off{opacity:.4}
.log{max-height:220px; overflow:auto; margin:0; padding:0 0 0 1.2em; font-size:13px; color:var(--muted)}
.log li{padding:2px 0}
.log li b{color:var(--fg)}
.toast{position:fixed; left:50%; bottom:200px; transform:translateX(-50%); z-index:40; max-width:min(560px, 90vw); padding:10px 16px; border-radius:10px; background:var(--fg); color:var(--bg); font-size:15px; box-shadow:0 10px 26px rgba(0,0,0,.35)}

/* the Lore of the Market when the player can buy it: its edges glow (08/11/2026) */
.res-group.lore.buyable > .pc > .face{border-radius:6px; box-shadow:0 0 0 2px #f2c94c, 0 0 16px 4px rgba(242, 201, 76, .55); animation:lore-glow 1.8s ease-in-out infinite}
@keyframes lore-glow{50%{box-shadow:0 0 0 2px #f2c94c, 0 0 26px 8px rgba(242, 201, 76, .8)}}
@media (prefers-reduced-motion:reduce){ .res-group.lore.buyable > .pc > .face{animation:none} }
