/* the table seen from the side: the heroes stand in one line on the left, the front one nearest the monster on the right,
   each with its bar and numbers under it · the hand fans out at the bottom · a hit's number rises over its target.
   Everything a seat reads stands in a named group with its icon; a line and a breath part one group from the next. */
:root { color-scheme: dark; --gap: 10px; --line: #ffffff24; --soft: #ffffff10; --ink: #f2efe8; --dim: #f2efe89e; --hp: #d8473a; --block: #4f8fd8; --heal: #5fbf6f; --mine: #e9c46a; --warn: #e2b23c;
  --card: #2b3a33; --card-edge: #6aa58a; --panel: #1f1c28; --panel-2: #262231; --radius: 12px; }
* { box-sizing: border-box; }
@font-face { font-family: "MH Icons"; src: url("/icons.woff2") format("woff2"); font-display: block; }
body { margin: 0; font: 16px/1.35 system-ui, -apple-system, "Segoe UI", "MH Icons", sans-serif; background: radial-gradient(1200px 600px at 50% -10%, #2a2340 0, #17141d 60%) fixed #17141d; color: var(--ink); }
button, input { font: inherit; font-family: system-ui, -apple-system, "Segoe UI", "MH Icons", sans-serif; }
/* the canvas · CLOSED: the window is what there is. The page is exactly as large as its window and scrolls nowhere, in no direction: whatever is drawn has a slot of a fixed size,
   and what does not fit a slot waits on that slot's next page (play.ts `fit`) · but the log (`olaylar`), a record that is read and never a choice: it scrolls down (`.fit.scroll`). A window smaller than the least canvas is shown the whole canvas, smaller (play.ts `canvas`). */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
main { position: fixed; inset: 0; transform-origin: 0 0; display: flex; flex-direction: column; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
main > section, main > form { width: 100%; margin-inline: auto; }
[hidden] { display: none !important; }
h1 { margin: 0 0 18px; font-size: 1.9rem; letter-spacing: .01em; text-align: center; }
h2 { margin: 0 0 var(--gap); font-size: 1.15rem; }
.ic { font-family: "MH Icons"; font-style: normal; font-weight: 400; display: inline-block; min-width: 1.15em; text-align: center; line-height: 1; }
.ic.big { font-size: 1.9rem; }
.hint { margin: 6px 0 0; font-size: .85rem; color: var(--dim); }
.grow { flex: 1; }

button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: inherit; cursor: pointer; transition: background .12s, border-color .12s, transform .12s; }
button:hover:not(:disabled) { background: #ffffff1c; border-color: #ffffff45; }
button:disabled { opacity: .4; cursor: default; }
button.chosen { border-color: var(--mine); color: var(--mine); background: #e9c46a1a; }
/* pressed once where every ask is done at once (the castle): the seat's colour, waiting for the second press that does it */
button.armed, .fit button.armed, button.primary.armed { border-color: var(--mine); background: var(--mine); color: #1b1608; animation: armed 1s ease-in-out infinite alternate; }
@keyframes armed { to { box-shadow: 0 0 0 3px #e9c46a55; } }
button.primary { width: 100%; min-height: 48px; border: 0; background: var(--mine); color: #1b1608; font-weight: 700; font-size: 1.05rem; }
button.primary:hover:not(:disabled) { background: #f3d27e; transform: translateY(-1px); }
button.primary.chosen { background: #5fbf6f; color: #0d1f12; }
button.quiet { border-color: transparent; background: none; color: var(--dim); }
button.chip-button { min-height: 32px; padding: 4px 10px; border-radius: 999px; font-size: .85rem; }

/* a chip: an icon, a number ∨ a word, the small word that says what it is */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--soft); font-size: .86rem; line-height: 1.25; white-space: nowrap; position: relative; }
.chip b { font-variant-numeric: tabular-nums; font-weight: 700; }
.chip small { font-size: .72rem; color: var(--dim); }
/* what the held weapon adds beside a hit's number («21 (+9)»: engine/keeps/passive-bonus) · a narrow card breaks the chip before whom it lands on instead of cutting it off */
.chip small.lent { color: var(--tone); font-weight: 700; }
.chip small.lift { margin-left: 3px; padding: 0 3px; border-radius: 4px; font-size: .72em; font-weight: 700; color: var(--tone); background: color-mix(in srgb, var(--tone) 16%, transparent); white-space: nowrap; }
.chip small.lift .ic { font-size: 1em; margin-right: 1px; }
.chip.id.more:has(.lift) b::after { content: none; }
.chip.warn { color: var(--warn); }
.chip.bad { color: #ef7b6f; }
.chip.good { color: var(--heal); }
.chip.dim { opacity: .6; }
.chip .meter { position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, currentColor var(--fill), #ffffff22 var(--fill)); }
.bag { display: inline-flex; gap: 3px; }
.bag .chip { padding: 1px 6px; background: #00000040; }

/* the door */
#door { max-width: 380px; margin: auto; padding: 26px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 20px 50px #0008; display: grid; gap: 10px; }
.field { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #00000030; }
.field:focus-within { border-color: var(--mine); }
.field .ic { color: var(--dim); }
.field input { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: 0; background: transparent; color: inherit; }
/* the line the page says something on stands over the canvas, never under it: it takes no room of its own */

/* the lobby: one card for each hero, the one you sit on is lit */
#lobby:not([hidden]) { display: flex; flex-direction: column; justify-content: center; min-height: 0; flex: 1; }
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.room { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
#room-code { font-family: ui-monospace, monospace; letter-spacing: .18em; font-size: 1.1rem; }
#lobby-title { text-align: center; font-weight: 600; color: var(--dim); font-size: .95rem; letter-spacing: .04em; }
#seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.seat { flex-direction: column; align-items: center; gap: 8px; padding: 18px 14px; min-height: min(230px, 34dvh); border-radius: 16px; background: var(--panel); text-align: center; }
.seat .face { display: grid; place-items: center; width: 76px; height: 96px; border-radius: 38px 38px 12px 12px; background: #4b5d73; font-size: 2rem; font-weight: 700; }
.seat .title { font-weight: 700; font-size: 1.1rem; }
.seat .about { font-size: .82rem; color: var(--dim); line-height: 1.3; flex: 1; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.seat.free { border-style: dashed; }
.seat.free:hover { transform: translateY(-3px); border-color: var(--mine); }
.seat.me { border: 2px solid var(--mine); background: #e9c46a14; box-shadow: 0 0 0 4px #e9c46a1c; opacity: 1; }
.seat.me .face { outline: 3px solid var(--mine); }
.seat.taken:disabled { opacity: .55; }
.seat:disabled.me { opacity: 1; }
.who.mine { color: var(--mine); }

/* the top line: three groups, a line between them */
#table:not([hidden]) { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
#top { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; min-height: 34px; padding-right: 52px; overflow: hidden; }
#top .sep { width: 1px; height: 22px; margin: 0 6px; background: var(--line); }
#top .chip { padding: 5px 11px; background: var(--panel); border: 1px solid var(--soft); font-size: .95rem; }
/* what the window's width alone does not say: the words of another language, a longer stock · play.ts `fitTop` measures the line once it is drawn ∧ said */
#top.tight .chip small, #top.tight .pace button:not(.chosen) { display: none; }
#top.two { flex-wrap: wrap; align-content: flex-start; gap: 4px; height: 62px; }
#top.two .grow { flex-basis: 0; }
/* two lines still too long for the narrowest window: the chips draw closer, nothing goes */
#top.least { gap: 3px; }
#top.least .chip { padding: 3px 5px; }
#top.least .sep { margin: 0; }
/* the door's team share on the narrowest line: the team's mark ∧ its number · the stress it is stands already on the chip it sits in */
#top.least .share > .ic:not(.who) { display: none; }

/* the stage: party left, monster right, both standing on one floor line */
/* the figures are as tall as the stage has room for: the stage takes what the top line and the deck leave */
#stage { position: relative; flex: 1 1 0; min-height: 0; container-type: size; --fact-h: 18px; --facts-h: calc(var(--facts, 0) * var(--fact-h)); --below: calc(78px + var(--facts-h)); --tall: min(clamp(34px, calc(100cqh - var(--below)), max(130px, 40cqh)), calc((100cqw - 150px) / var(--party, 3))); display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 44px 6px 6px;
  border-radius: var(--radius); background: linear-gradient(#2a2238 0 68%, #1e1a24 68%); border: 1px solid var(--soft); }
#party { display: flex; align-items: flex-end; gap: 4px; flex: 0 1 auto; min-width: 0; }
/* the monster takes what the party leaves (its name wraps in it), never a share of the party's own width */
#foe { display: flex; justify-content: flex-end; flex: 1 1 0; min-width: 96px; }
#foe .fighter { min-width: 0; }
.fighter { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: max(62px, calc(var(--tall) * .98)); min-width: 0; cursor: pointer; }
#foe .fighter { width: 100%; max-width: 260px; }
.fighter .body { display: grid; place-items: center; height: var(--tall); width: calc(var(--tall) * .69); border-radius: 30px 30px 8px 8px; background: #4b5d73; font-size: clamp(1rem, calc(var(--tall) * .27), 2.2rem); font-weight: 700; animation: bob 3.2s ease-in-out infinite alternate; animation-delay: var(--bob, 0s); }
.fighter:nth-child(2n) .body { animation-delay: calc(var(--bob, 0s) - 1.3s); }
#foe .body { width: min(100%, calc(var(--tall) * 2)); height: calc(var(--tall) * 1.38); max-height: calc(100cqh - var(--below)); border-radius: 50% 50% 14px 14px; background: #6a4b7d; font-size: clamp(1.3rem, calc(var(--tall) * .4), 2.6rem); }
.fighter.me .body { outline: 3px solid var(--mine); }
.fighter .you { position: absolute; top: -22px; left: 50%; translate: -50% 0; padding: 1px 8px; border-radius: 999px; background: var(--mine); color: #1b1608; font-size: .68rem; font-weight: 700; letter-spacing: .04em; }
.fighter.down { opacity: .35; filter: grayscale(1); }
.fighter.down .body { animation: none; }
.fighter.target .body { outline: 3px dashed var(--heal); animation: pulse 1s infinite alternate; }
.fighter.aimed .body { outline: 3px solid var(--heal); }
@keyframes pulse { to { outline-offset: 3px; } }
@keyframes bob { to { translate: 0 -3px; } }
.fighter .name { font-size: .78rem; font-weight: 600; line-height: 1.15; text-align: center; max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
/* a name is read whole: the joke of an absurd name is its last word · it wraps under its figure, and the figure's body gives way to it (below) so the stage cuts nothing */
.fighter .name .chip.named { display: inline; white-space: normal; }
.fighter .name .chip.named .ic { margin-right: 4px; }
#party, #foe { align-self: stretch; align-items: flex-end; }
.fighter { max-height: 100%; }
.fighter > * { flex-shrink: 0; }
.fighter .body { flex-shrink: 1; min-height: 24px; }
/* on a stage too short for a body, a name ∧ two rows of marks, the second row of marks goes before the stage cuts (as under 560 px of height) */
.fighter .tags { flex-shrink: 1; min-height: 20px; }
.hp { position: relative; width: 100%; height: 14px; border-radius: 7px; background: #00000080; overflow: hidden; }
.hp i { position: absolute; inset: 0 auto 0 0; background: var(--hp); }
.hp b { position: relative; display: block; text-align: center; font-size: .7rem; line-height: 14px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }
.fighter .body { position: relative; }
/* a shield stands in front of the one it guards, on the side blows come from (the monster's side for a hero, the heroes' side for the monster): a bowed, see-through wall at the picture's edge that a blow meets first */
.fighter .body > .shield { position: absolute; top: 3%; bottom: 3%; right: clamp(-16px, calc(var(--tall) * -.1), -6px); width: clamp(12px, calc(var(--tall) * .15), 24px); z-index: 2; pointer-events: none; transform-origin: left center;
  border-right: 5px solid var(--block); border-radius: 0 60% 60% 0 / 0 50% 50% 0; background: linear-gradient(to right, transparent 10%, color-mix(in srgb, var(--block) 65%, transparent)); box-shadow: 8px 0 14px -5px var(--block); }
#foe .body > .shield { right: auto; left: clamp(-16px, calc(var(--tall) * -.1), -6px); transform-origin: right center; border-right: 0; border-left: 5px solid var(--block); border-radius: 60% 0 0 60% / 50% 0 0 50%; background: linear-gradient(to left, transparent 10%, color-mix(in srgb, var(--block) 65%, transparent)); box-shadow: -8px 0 14px -5px var(--block); }
/* its number rides on its top, inside the picture's edge: it never crosses the figure beside it (the monster's arch is empty at its top corner: there it rides halfway up) */
.fighter .body > .shield > .block { position: absolute; top: 0; right: clamp(6px, calc(var(--tall) * .1), 16px); padding: 2px 7px; background: var(--block); color: #fff; font-size: .9rem; white-space: nowrap; box-shadow: 0 1px 4px #000a; pointer-events: auto; }
#foe .body > .shield > .block { top: 50%; translate: 0 -50%; right: auto; left: clamp(6px, calc(var(--tall) * .1), 16px); }
/* an identity's chip writes its icon ∧ number in the identity's colour: on the shield's own colour that is blue on blue */
.fighter .chip.block .ic, .fighter .chip.block b { color: #fff; }
/* the marks under a figure keep two rows of room: a hero with more marks does not stand higher than its neighbours */
.fighter .tags { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 3px; height: 40px; overflow: hidden; }
#foe .fighter::after { content: ""; min-height: 40px; }
.fighter .tags .chip { padding: 1px 6px; font-size: .7rem; gap: 3px; }
/* a held thing's numbers under its holder, the maker's eyes only: a row per thing below the marks, as many rows under every hero as the one holding the most, so the figures stand level ∧ nothing sits on a picture */
.fighter .held-facts { display: flex; flex-direction: column; align-items: center; width: 100%; height: var(--facts-h); overflow: hidden; }
.fighter .held-facts .held-line { display: flex; flex-wrap: nowrap; align-items: center; gap: 0 5px; max-width: 100%; height: var(--fact-h); padding: 0 6px; border-radius: 6px; background: #00000040; white-space: nowrap; overflow: hidden; }
.fighter .held-facts .chip { padding: 0; gap: 2px; background: none; font-size: .7rem; }
/* the monster stands on the same floor as the party's bars */
#foe { padding-bottom: calc(var(--facts-h) + min(var(--facts, 0), 1) * 3px); }
/* on a phone a figure is a thumb wide: a thing's numbers take two short rows of its own (they do not fit one), smaller, the range's own icon gone (the thing's icon leads) */
@media (max-width: 719px) { #stage { --fact-h: 25px; } .fighter .held-facts .held-line { flex-wrap: wrap; justify-content: center; align-content: center; gap: 0 3px; padding: 0 2px; border-radius: 4px; line-height: 1.1; } .fighter .held-facts .held-line > .chip.id .ic { display: none; } .fighter .held-facts .chip { font-size: .54rem; gap: 1px; } }
.fighter .tags .chip small { font-size: .64rem; }
.fighter .tags .place { background: #ffffff22; min-width: 18px; justify-content: center; }
.fighter .tags .role { background: none; padding: 1px 2px; color: var(--dim); }
/* what the monster does next: above its head, wrapping on a narrow screen rather than cut */
.intent { position: absolute; bottom: calc(100% + 4px); right: 0; display: flex; gap: 6px; align-items: baseline; width: max-content; max-width: 100%; padding: 4px 10px; border-radius: 10px; background: #000000a0; font-size: .78rem; line-height: 1.25; color: var(--warn); }
/* the castle stands where the monster stood: its rounds as dots, the raid as a countdown */
.keep { display: grid; place-items: center; align-content: center; gap: 6px; width: 100%; max-width: 220px; height: min(130px, calc(100cqh - 20px)); margin-bottom: 40px; border: 1px solid var(--line); border-radius: 14px; background: #00000030; }
.keep .words { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; max-width: 100%; padding: 0 6px; text-align: center; overflow-wrap: break-word; }
/* the raiders' name is read whole where the monster stood: it wraps in the keep, the keep stays the stage's */
.keep { min-width: 0; }
.keep .words .chip.named { display: inline; white-space: normal; }
.keep .words .chip.named .ic { margin-right: 4px; }
.keep .dots { display: flex; gap: 6px; }
.keep .dots i { width: 9px; height: 9px; border-radius: 50%; background: #ffffff2a; }
.keep .dots i.done { background: var(--dim); }
.keep .dots i.now { background: var(--mine); box-shadow: 0 0 8px var(--mine); }
.keep.raid { border-color: var(--hp); color: #ef7b6f; animation: pulse 1s infinite; }

/* the number of a hit rises over its target and fades */
.pop { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); font-size: 2rem; font-weight: 800; pointer-events: none; opacity: 0;
  text-shadow: 0 2px 0 #000, 0 0 6px #000; animation: rise 1.1s ease-out forwards; }
.pop.hit { color: #fff; }
.pop.healed { color: var(--heal); }
.pop.shielded { color: var(--block); }
/* what the shield held rises off the shield's side, in its colour, beside the hit's own number */
.pop.blocked { color: var(--block); left: 90%; font-size: 1.5rem; font-family: system-ui, -apple-system, "Segoe UI", "MH Icons", sans-serif; }
#foe .pop.blocked, #foe .pop.shielded { left: 10%; }
.pop.shielded { left: 90%; }
.pop.weak-hit { color: #e2b54a; font-size: 1rem; }
/* a stress rises like a hit, on the far side from what the shield held, in the stress colour the motion gives it */
.pop.stressed { left: 22%; font-size: 1.6rem; white-space: nowrap; font-family: "MH Icons", system-ui, sans-serif; }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -40px) scale(1); } }
#over { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-size: 2rem; font-weight: 800; background: #0008; border-radius: var(--radius); }

/* the deck: a rail of tabs, one pane, the column that ends the turn · its height is the scene's (a fight is mostly its stage, a castle mostly its bench), never its content's */
#deck { --deck: clamp(176px, 34dvh, 290px); display: grid; grid-template-columns: minmax(118px, 168px) minmax(0, 1fr) minmax(120px, 176px); gap: 8px; flex: 0 0 var(--deck); height: var(--deck); min-height: 0; }
body[data-scene="castle"] #deck { --deck: clamp(220px, 46dvh, 420px); }
body[data-scene="over"] #deck { --deck: clamp(220px, 50dvh, 440px); }
#tabs { display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow: hidden; }
#tabs .tab { justify-content: flex-start; flex: 0 1 38px; min-height: 21px; padding: 0 10px; line-height: 1.2; border-radius: 10px; font-size: .86rem; text-align: left; }
#tabs .tab span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tabs .tab.open { background: var(--panel); border-color: var(--mine); box-shadow: inset 3px 0 0 var(--mine); }
#tabs .tab.beside { border-style: dashed; }
/* a job with nothing to ask this turn (the stock pays for none of it) stands where it always stands, dim: it is not gone, it waits for the stock */
#tabs .tab.dim:not(.open) { color: var(--dim); opacity: .62; }
#tabs .tab.act { border-radius: 999px; }
/* the turn's one move is one frame (picking one lets the others go), what is done beside it a dashed one · each says so in a word over its tabs */
#tabs .group { display: flex; flex-direction: column; gap: 3px; min-height: 0; padding: 3px; border: 1px solid var(--line); border-radius: 12px; }
#tabs .group.beside { border-style: dashed; }
#tabs .group > small { padding: 0 8px; font-size: .68rem; color: var(--dim); line-height: 1.3; }
#tabs .tab .on, #utils .tab .on { color: var(--mine); }
/* what is read, not asked (what the seat knows · what happened): small, on the top line */
#side { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 0; }
#utils { display: flex; flex-direction: column; gap: 3px; flex: 0 1 auto; min-height: 0; overflow: hidden; }
#utils:empty { display: none; }
#utils .tab { justify-content: flex-start; flex: 0 1 30px; min-height: 21px; padding: 0 10px; border-radius: 10px; font-size: .82rem; color: var(--dim); text-align: left; }
#utils .tab span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#utils .tab.open { color: var(--ink); border-color: var(--mine); }
#pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 6px 10px 8px; border: 1px solid var(--soft); border-radius: var(--radius); background: var(--panel); }
#pane:empty { visibility: hidden; }
.pane-head { display: flex; align-items: center; gap: 6px; flex: none; height: 26px; margin-bottom: 6px; border-bottom: 1px solid var(--soft); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; }
.pane-head b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pager { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.pager button { min-height: 22px; padding: 0 8px; font-size: .8rem; }
.pager button.back { transform: scaleX(-1); }
.pager small { font-variant-numeric: tabular-nums; letter-spacing: 0; }
/* a pane's pieces: what fits stands, what does not waits on the next page */
.fit { position: relative; flex: 1 1 0; min-height: 0; min-width: 0; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.fit.flow { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 6px; }
.fit.cols { display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 2px 18px; }
.fit.cols > * { width: min(100%, 340px); }
.fit.stack { display: flex; flex-direction: column; gap: 8px; }
.fit.stack > * { flex: none; min-width: 0; max-width: 100%; }
/* the log: one event a line, as wide as the pane, read downwards: the one box that scrolls (ARCHITECTURE.md «The canvas») */
.fit.scroll { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overscroll-behavior: contain; }
.fit.scroll > * { flex: none; min-width: 0; }
/* the cards tab ∧ a hero's page: one card size, one ratio, in columns that fill the width ∧ scroll down · a head ∨ a sentence takes a whole row (play.ts layout "grid") */
.fit.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: auto; align-content: start; align-items: start; gap: 16px 12px; padding: 12px 10px 8px; overflow-y: auto; overscroll-behavior: contain; container-type: normal; }
.fit.grid > :not(.card):not(.about) { grid-column: 1 / -1; min-width: 0; }
.fit.grid > h3 { margin: 6px 0 -6px; }
/* a card of the grid is the page's one card (card-view), only sized by the grid: the grid draws nothing of a card */
.fit.grid > .card { --w: 124px; width: auto; height: auto; aspect-ratio: 3 / 4; margin: 0; transform: none; }
.fit.grid > .card .title { font-size: .86rem; }
.fit.grid > .card .line { font-size: .74rem; }
.fit.grid > .card .line .chip { font-size: 1em; padding: 2px 4px; gap: 0 3px; }
/* a hero's job ∧ its flaw: a dashed note of a card's size, plainly not a card */
.fit.grid > .about { aspect-ratio: 3 / 4; min-width: 0; min-height: 0; box-sizing: border-box; padding: 8px; border: 2px dashed var(--card-edge); border-radius: 10px; background: #1d2823; display: flex; flex-direction: column; gap: 4px; }
.about .title { display: flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.about .said { flex: 1 1 0; min-height: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; font-size: .74rem; line-height: 1.3; color: var(--ink); }
@media (max-width: 719px) { .fit.grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px 10px; } .fit.grid > .card { --w: 96px; } .fit.grid > .card .title { font-size: .8rem; } .about .said { -webkit-line-clamp: 6; font-size: .7rem; } }
.titles .chip { white-space: normal; }
.fit button { min-height: 34px; max-width: 100%; padding: 4px 10px; font-size: .88rem; }
.fit button .chip.named { white-space: normal; text-align: left; }
.fit button .does { max-width: 100%; }
/* a pane's height is its window's, never its pieces': a piece may size itself to it (the maker's deck) */
#pane > .fit { container-type: size; }
/* the maker's deck (screens/web/workshop-card.ts): a row of cards that slides, the squares of whom on the right · as large as the pane, never larger */
.wdeck { display: flex; flex-direction: column; gap: 4px; width: 100%; height: 100cqh; min-width: 0; }
.whead { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; overflow: hidden; flex: none; }
.whead .chip { background: none; padding: 0 4px; font-size: .74rem; white-space: nowrap; }
.wrow { display: flex; gap: 8px; flex: 1 1 0; min-height: 0; }
.wstrip { display: flex; gap: 8px; flex: 1 1 0; min-width: 0; overflow: hidden; touch-action: pan-y; }
.wslider { flex: none; width: 100%; height: 14px; margin: 0; accent-color: var(--mine); }
.wslider[hidden] { display: none; }
.wcard { --pad: 6px; position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: clamp(104px, min(calc((100cqh - 48px) * .74), 36cqw), 176px); height: 100%; padding: var(--pad); border-radius: 14px; background: var(--panel-2); border: 1px solid var(--soft); container-type: size; }
.wcard[hidden] { display: none; }
.wcard.dim { opacity: .5; }
.wface { display: flex; align-items: center; gap: 3px; width: 100%; min-height: 22px; font-size: .8rem; }
.wface .chip.named { white-space: normal; line-height: 1.1; }
.wface .grow { flex: 1; }
.wring { position: relative; flex: none; width: min(100cqw, calc(100cqh - 30px - var(--foot, 0px))); aspect-ratio: 1; border-radius: 50%; border: 1px dashed var(--line); }
.wcard:has(.wfoot) { --foot: 26px; }
.fit .wspot { position: absolute; left: calc(50% + 33% * var(--x) - 17%); top: calc(50% + 33% * var(--y) - 17%); width: 34%; height: 34%; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 0; border: 2px dashed currentColor; background: transparent; color: var(--dim); font-size: clamp(.6rem, 9cqw, .9rem); line-height: 1; opacity: .45; transition: opacity .18s, background .18s; }
button.wspot { cursor: pointer; }
.fit .wspot.extra { border-style: dotted; border-color: #e9c46a; }
.fit .wspot.on { opacity: 1; border-style: solid; background: #ffffff1a; color: var(--ink, inherit); }
.fit .wspot small { font-size: .62em; color: var(--dim); }
/* a mark in a place (a thing's place, tier, pile) is its icon: its name waits under the pointer */
.fit .wspot .chip { padding: 0; background: none; }
.fit .wspot .chip b { display: none; }
.wmiddle { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 36%; height: 36%; display: grid; place-items: center; }
.fit .wmiddle > button { width: 100%; height: 100%; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 0; font-size: clamp(.58rem, 8cqw, .8rem); font-weight: 700; line-height: 1.05; border: 2px solid currentColor; background: #8fcf7a33; animation: wopen .3s ease-out; }
.fit .wmiddle > button .ic { font-size: 1.2em; }
.wcount { font-size: .74rem; color: var(--dim); }
@keyframes wopen { from { scale: .6; } 60% { scale: 1.2; } to { scale: 1; } }
.wfoot { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 3px; width: 100%; height: 24px; overflow: hidden; }
.fit .wfoot button { min-height: 22px; padding: 1px 6px; font-size: .74rem; }
.wfoot .pushes { font-size: .72rem; white-space: nowrap; }
.fit button.wtoggle { min-height: 22px; padding: 1px 6px; opacity: .55; }
.fit button.wtoggle.on { opacity: 1; color: #ef7b6f; border-color: currentColor; }
/* the bar over the cards (G-be872eaf): the ask, then one pill for each hero side by side, its icon ∧ name on one line, the seat's own with a «sen» badge,
   what its bags hold beside the name · the pill grows to the right with what it holds, never wraps into a column */
.wbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; flex: none; min-width: 0; overflow: hidden; }
.wbar .grow { flex: 1; }
.fit .wbar > button { flex: none; min-height: 0; height: 28px; padding: 0 8px; display: flex; flex-direction: row; align-items: center; gap: 6px; border-radius: 999px; font-size: .74rem; white-space: nowrap; }
.fit .wbar .chip { flex: none; padding: 0 2px; background: none; line-height: 1.1; }
.fit .wbar .wname { display: flex; align-items: center; gap: 4px; min-width: 0; }
.fit .wbar .wname .chip.named { flex-direction: row; gap: 3px; white-space: nowrap; }
.fit .wbar .wname .you { flex: none; padding: 0 5px; border-radius: 999px; background: var(--mine); color: #1d1a16; font-size: .62rem; font-weight: 700; line-height: 1.35; }
.fit .wbar .wfill { display: flex; gap: 3px; }
.fit .wbar .wfill .chip { gap: 2px; padding: 0 5px; border-radius: 6px; background: #00000040; line-height: 1.35; }
.fit .wbar > button.wwho.chosen { border-color: var(--mine); background: #e9c46a26; }
.fit .wbar > button.wpile { opacity: .8; border-style: dashed; }
.wbar > .wact { flex: none; display: flex; align-items: center; padding-right: 8px; margin-right: 2px; border-right: 1px solid var(--line); }
.fit .wbar > .wact > button { height: 28px; min-height: 0; padding: 0 10px; display: flex; flex-direction: row; align-items: center; gap: 5px; font-size: .75rem; border-radius: 999px; white-space: nowrap; }
.wbar > .wact > small.dim { opacity: .6; font-size: .7rem; white-space: nowrap; }
.wcard.picked { border-color: var(--mine); box-shadow: 0 0 0 1px var(--mine); }
.fit h3 { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.fit h3[data-id] { color: var(--mine); }
#go { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; flex: 0 1 auto; min-height: 0; }
#go button.primary { flex: 0 1 64px; min-height: 40px; padding: 4px 8px; font-size: .98rem; }
.buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.row { display: grid; grid-template-columns: auto minmax(70px, auto) 1fr; align-items: baseline; gap: 4px 8px; padding: 3px 0; font-size: .88rem; }
.row > small { color: var(--dim); font-size: .76rem; }
.row .value { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.thing { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 8px; background: #00000030; }
#wait { display: flex; align-items: center; gap: 4px 6px; flex: none; height: 26px; margin: 0 2px; font-size: .85rem; color: var(--dim); white-space: nowrap; overflow: hidden; }
#wait > * { flex: none; max-width: 100%; }
#wait > .chip.now { flex: 0 1 auto; min-width: 0; max-height: 24px; overflow: hidden; }
#wait > .chip.now > * { flex: none; }
.sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.sub > small { min-width: 74px; color: var(--dim); font-size: .8rem; }

/* the castle's board */
.road { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--soft); }
.road { max-width: 360px; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.short { color: var(--dim); font-size: .78rem; }
.road.picked { border-color: var(--heal); }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .86rem; }
.chain span { padding: 2px 8px; border-radius: 999px; background: #00000035; }
.read { padding-top: 4px; border-top: 1px dashed var(--soft); font-size: .84rem; }
.read p { margin: 2px 0 4px; color: var(--dim); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* the hand fans out at the bottom: cost top left, name on top, its one line below */
.fit.hand { display: flex; justify-content: center; align-items: flex-start; overflow: visible; padding: 14px 8px 0; container-type: size; }
.card { position: relative; min-width: 0; height: min(200px, calc(100cqh - 30px)); padding: 22px 8px 8px; border: 2px solid var(--card-edge); border-radius: 10px;
  background: linear-gradient(var(--card) 0 55%, #1d2823 55%); text-align: left; transform-origin: 50% 120%; transition: transform .15s; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; }
.card:hover:not(:disabled) { background: linear-gradient(#34473e 0 55%, #22302a 55%); z-index: 2; }
.card.aiming { z-index: 2; }
.card.chosen, .card.aiming { border-color: var(--mine); }
/* the card's room above its name is the price's: the hand's own rule outranks `.fit button`'s padding, so the price chip, the kind's icon ∧ the name never stand on one another */
.fit.hand .card { padding: 22px 8px 8px; }
/* the scout's three guesses are the monster's cards themselves, as a hand draws its own: the button around them stays out of sight */
/* a card held inside another piece (an option's button · the card in the air over a hero ∨ the monster) is the one card (card-view) at one fixed size: the same card everywhere */
button:has(> .card) { padding: 0; border: none; background: none; }
button > .card, .flying > .card { width: 112px; height: 156px; flex: none; padding: 22px 6px 6px; gap: 4px; }
button > .card .title, .flying > .card .title { font-size: .8rem; overflow: visible; max-height: none; }
button > .card .art, .flying > .card .art { flex: 1 1 0; min-height: 0; }
button.chosen > .card { border-color: var(--mine); }
.flying:has(> .card) { min-width: 0; max-width: none; padding: 0; border: none; background: none; box-shadow: none; text-align: left; font-weight: 400; }
.flying > .card { border-color: var(--kind, var(--card-edge)); box-shadow: 0 8px 22px #000a, 0 0 18px var(--kind, #e2b54a55); }
/* a thing held (a weapon): it stands in the hand after the cards and is picked as a card is, but it is no card · steel, round-shouldered, upright, shorter, no cost: its icon in a ring over its name */
.held { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 8px 6px 6px; border: 2px solid #8796a5; border-radius: 26px 26px 12px 12px; background: radial-gradient(circle at 50% 22%, #3a4652 0 30%, #252d35 70%); box-shadow: inset 0 0 0 3px #1b2228, 0 2px 0 #11161b; color: var(--ink); text-align: center; }
.held .face { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; border-radius: 50%; border: 2px solid #a9b8c8; background: #1b2228; font-size: 1.4rem; color: #cfd9e2; }
.held .title { font-weight: 700; font-size: .82rem; line-height: 1.15; overflow: hidden; max-width: 100%; }
.held .title .chip.named { display: inline; white-space: normal; padding: 0; background: none; }
.held .line { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; font-size: .78rem; }
.held:hover:not(:disabled) { border-color: #cfd9e2; }
.held.chosen { border-color: var(--mine); }
.card .cost { position: absolute; top: -10px; left: -8px; display: flex; gap: 2px; }
.card .cost span { display: flex; align-items: center; justify-content: center; gap: 2px; line-height: 24px; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; background: #16301f; border: 2px solid var(--card-edge); font-weight: 800; font-size: .9rem; }
.card .cost small { font-size: .6rem; font-weight: 600; opacity: .8; }
.card .cost .ic { font-size: .8rem; opacity: .9; }
.card .title { font-weight: 700; font-size: .92rem; line-height: 1.15; overflow: hidden; overflow-wrap: normal; flex: none; }
/* a card's name is read whole: it wraps between its words (play.ts `fitNames` makes the letters smaller where a word is wider than the card) */
.card .title .chip.named { display: inline; white-space: normal; padding: 0; background: none; max-width: none; overflow: visible; }
.card .line { margin-top: auto; font-size: .72rem; line-height: 1.2; opacity: .9; overflow: hidden; }

/* the end: the story, the ledger, the way back */
.fit h2 { margin: 0; font-size: 1.3rem; }
.fit h2.won { color: var(--heal); }
.fit h2.lost { color: #ef7b6f; }
.fit .story { margin: 0; color: var(--dim); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.ledger { display: grid; grid-template-columns: minmax(84px, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 4px 8px; align-items: center; font-variant-numeric: tabular-nums; }
.ledger > * { min-width: 0; overflow: hidden; }
.ledger > .chip small { overflow: hidden; text-overflow: ellipsis; }
.ledger > .chip { background: none; padding: 0; justify-content: flex-end; }
.ledger > b { text-align: right; }
.ledger .who { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ledger .who .chip { background: none; padding: 0; }
.titles { display: flex; flex-wrap: wrap; gap: 6px; }

#log { font-family: ui-monospace, "MH Icons", monospace; font-size: .8rem; }
#log li { overflow-wrap: anywhere; }
/* a turn is a block: its chip heads a band, its lines stand indented under one rule, the next turn opens a new band */
#log li:not(.turn) { margin-left: 9px; padding: 1px 0 1px 10px; border-left: 2px solid var(--line); }
#log li.turn { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 3px 8px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); font-weight: 600; color: var(--dim); }
#log li.turn:first-child { margin-top: 0; }
#log li.turn .chip { background: none; padding: 0; }

#news-sheet { position: fixed; inset: 0; z-index: 20; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 28px; background: #0c0c12f2; }
#news-sheet[hidden] { display: none; }
#news-sheet h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
#news-list { width: min(34rem, 100%); max-height: 62vh; overflow: hidden; display: grid; gap: 14px; }
#news-list article { border-left: 3px solid var(--line); padding-left: 12px; }
#news-list h3 { margin: 0 0 6px; font-size: 1rem; }
#news-list ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 4px; line-height: 1.5; }
#news-sheet .primary { width: auto; min-width: 160px; }
#opening { position: fixed; inset: 0; z-index: 20; display: grid; align-content: center; justify-items: center; gap: 20px; padding: 28px; background: #0c0c12f2; }
#opening p { max-width: 34rem; margin: 0; font-size: 1.15rem; line-height: 1.6; }
#opening .primary { width: auto; min-width: 160px; }
.skinned { background-size: cover; background-position: center; }
.card.skinned { background-blend-mode: multiply; }
.watching .card { cursor: help; }
.flying { position: absolute; z-index: 6; transform: translate(-50%, 0); min-width: 84px; max-width: 190px; padding: 14px 10px; border: 2px solid var(--card-edge); border-radius: 10px;
  background: linear-gradient(160deg, #3a2f52, #1c1a2a); box-shadow: 0 8px 22px #000a, 0 0 18px #e2b54a55; font-weight: 700; text-align: center; pointer-events: none; }
.flying.wielded { border-color: #9fb3c8; box-shadow: 0 8px 22px #000a, 0 0 18px #9fb3c877; }
.flying .title { font-weight: 700; line-height: 1.2; }
.flying .title .chip.named { display: inline; white-space: normal; padding: 0; }
.flying .line .chip { white-space: normal; }
.flying .line { margin-top: 6px; font-size: .72rem; font-weight: 400; opacity: .85; }
.streak { position: absolute; z-index: 7; height: 5px; margin: -2px 0 0 0; transform-origin: 0 50%; border-radius: 3px; pointer-events: none;
  background: linear-gradient(90deg, #fff0, #ffd36b 55%, #fff); box-shadow: 0 0 12px #ffb84a, 0 0 3px #fff; }
.say { position: absolute; z-index: 8; transform: translate(-50%, 0); max-width: 240px; padding: 5px 10px; border-radius: 8px; background: #000c; font-size: .85rem; font-weight: 600; text-align: center; pointer-events: none; }
.spark { position: absolute; z-index: 7; width: 5px; height: 5px; margin: -2px 0 0 -2px; border-radius: 50%; background: #ffd36b; box-shadow: 0 0 8px #ffb84a; pointer-events: none; }
.fighter.struck .body { filter: brightness(1.9) saturate(.4); }
.playing #tabs, .playing #pane, .playing #go { opacity: .45; pointer-events: none; }
.watching.playing #pane, .watching.playing #tabs { opacity: 1; pointer-events: auto; }
/* the events are read while the turn plays: the log is never dimmed (the owner, 2026-11-15: «Olaylar tarafı oyun aktifken pasif, soluk renk gözüküyor. Yanlış olmuş») */
.playing #pane[data-tab="log"] { opacity: 1; pointer-events: auto; }
#replay { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; flex: none; min-height: 34px; overflow: hidden; }
#replay #reel { flex: 1 1 260px; min-width: 200px; }
#reel { display: flex; align-items: center; gap: 6px; }
#reel button { min-width: 44px; padding: 6px 10px; font-size: 1.1rem; }
#reel input { flex: 1; min-width: 0; accent-color: #e2b54a; }
#reel span { font-variant-numeric: tabular-nums; opacity: .7; font-size: .85rem; }
#reel-prev { transform: scaleX(-1); }
/* a wide window: where the reel stands is read on one line, beside its buttons · it never stands on the marks */
@media (min-width: 900px) {
  #replay #reel { flex-basis: 350px; min-width: 350px; }
  #reel span { flex: none; white-space: nowrap; }
}
/* where each fight begins: one mark for each, by its monster's own icon · the name waits under the pointer */
#fights { display: flex; flex: 0 1 auto; gap: 3px; min-width: 0; overflow: hidden; }
#fights button { flex: 0 1 34px; min-width: 20px; min-height: 30px; padding: 2px; font-size: .9rem; overflow: hidden; }
#fights button .chip b { display: none; }
/* a mark is its icon alone: in the room a narrow reel leaves it, nothing of one stands on another */
#fights button { display: grid; place-items: center; }
#fights button .chip { padding: 0; gap: 0; background: none; }

@media (min-width: 720px) {
  #stage { padding: 48px 24px 8px; }
  #party { gap: 10px; }
  .card .title { font-size: 1.05rem; }
  .card .line { white-space: normal; font-size: .9rem; }
}

/* what waits under the pointer: the page's own, shown at once */
.tip { position: fixed; z-index: 60; max-width: min(300px, 90vw); padding: 6px 10px; border-radius: 8px; background: #0b0f14f2; border: 1px solid var(--line); box-shadow: 0 6px 18px #0009; font-size: .82rem; line-height: 1.3; color: var(--ink); pointer-events: none; }
[data-tip] { cursor: help; }
/* what a press says, beside what was pressed: it takes presses (a press on it keeps it), a warning is said in its colour */
.tip.pin { z-index: 61; pointer-events: auto; }
.tip.pin.bad { color: #ef7b6f; border-color: #ef7b6f80; }
button[data-tip], .card[data-tip], .fighter[data-tip] { cursor: pointer; }
.fighter[data-part=canavar] { cursor: help; }
/* how fast the stage plays */
#top .quit { min-height: 28px; padding: 2px 8px; flex: none; }
.pace { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--soft); font-size: .78rem; color: var(--dim); }
.pace button { min-height: 26px; padding: 2px 9px; border: 0; border-radius: 999px; background: none; color: var(--dim); font-size: .78rem; }
.pace button.chosen { background: var(--mine); color: #1b1b1b; font-weight: 700; }
/* what a group's options share: the stake, the rule, the clue · one line on top, a rule under it */
.lead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; width: 100%; padding-bottom: 4px; border-bottom: 1px dashed var(--line); }
.lead .chip { background: none; padding: 0 4px; font-size: .78rem; white-space: normal; }
.lead .chip.clue { padding: 3px 9px; background: #00000040; color: var(--mine); font-size: .86rem; font-weight: 600; }
.lead > small { width: 100%; color: var(--dim); font-size: .74rem; }
.fit button:has(> b + small) { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; }
.fit button > small { color: var(--dim); font-size: .72rem; font-weight: 400; }
/* this turn: what the seat asked, then whom the table waits for */
#wait small { color: var(--dim); }
/* whom the table waits for is one whole (its word ∧ its heroes): it stands as the line's own parts stood, side by side */
#wait .waited { display: inline-flex; align-items: center; gap: 4px 6px; }
#wait .waited > * { flex: none; }
#wait .sep { width: 1px; height: 16px; margin: 0 4px; background: var(--line); }
.chip.now { color: var(--ink); border: 1px solid var(--mine); background: #e9c46a1f; }
.chip.now.beside { border-style: dashed; }
.chip.guess { color: #1b1b1b; background: var(--mine); font-weight: 700; }
.chip.guess small { color: #1b1b1b; }
.fighter.away .body { filter: grayscale(.85) brightness(.65); animation: none; }
.streak.soul { height: 4px; background: linear-gradient(90deg, #0000, var(--tone-cards), #fff); box-shadow: 0 0 10px color-mix(in srgb, var(--tone-cards) 67%, transparent); }
.flying .badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; background: #b98cff; color: #1b1b1b; font-size: .68rem; font-weight: 800; white-space: nowrap; }

#wait small.owes { color: var(--warn); }
#go > button.end.ended { opacity: .75; }
/* fallen cards wait: the end of the turn is not offered over them, it points at them */
#go > button.end.owed { background: transparent; color: var(--warn); border: 1px dashed var(--warn); }
/* an identity: its icon and its number wear its colour, on every screen */
.chip.id .ic, .chip.id b { color: var(--tone); }
.card .line { display: flex; flex-wrap: wrap; gap: 3px; }
.card .line .chip, .fit button .does .chip { padding: 1px 6px; font-size: .8rem; background: #00000038; }
.fit button .does { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.fit button:has(> b + .does) { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }

/* a thing by its name: its icon and its name in its colour, wherever it stands · it takes the size of the words around it */
.chip.named { background: none; padding: 0; gap: 4px; font-size: inherit; line-height: inherit; vertical-align: baseline; }
.chip.named b { font-weight: 700; }
#log .chip, .say .chip, .sign .chip, #wait .chip.id, .intent .chip, .flying .chip, .sub > .chip.named { background: none; padding: 0 1px; font-size: inherit; }
.say .chip, .sign .chip, #log .chip { display: inline-flex; vertical-align: baseline; }
.seat .title .chip.named { max-width: 100%; overflow: hidden; }
.intent { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }

/* the reel steps one event at a time: the smaller pair of buttons */
#reel-back { transform: scaleX(-1); }
#reel-back, #reel-step { min-width: 34px; padding: 6px 8px; font-size: .85rem; opacity: .85; }
/* the kit of motion.ts: an icon that lives through a motion, the bits a burst throws, a ring that opens ∨ closes */
.mark { position: absolute; z-index: 8; font-family: "MH Icons", system-ui, sans-serif; font-size: 1.5rem; font-weight: 800; line-height: 1; white-space: nowrap; translate: -50% -50%; pointer-events: none; text-shadow: 0 0 10px currentColor, 0 1px 2px #000a; }
.bit { position: absolute; z-index: 7; font-family: "MH Icons", system-ui, sans-serif; font-size: 1rem; line-height: 1; margin: -.5em 0 0 -.5em; pointer-events: none; text-shadow: 0 0 6px currentColor; }
.bit.dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.bit.dot.cloud { width: 22px; height: 22px; margin: -11px 0 0 -11px; opacity: .55; filter: blur(5px); box-shadow: none; }
.ring { position: absolute; z-index: 6; width: 76px; height: 76px; margin: -38px 0 0 -38px; border: 3px solid currentColor; border-radius: 50%; box-shadow: 0 0 12px currentColor; pointer-events: none; }
.streak.dull { height: 4px; background: linear-gradient(90deg, #0000, #9aa3ad); box-shadow: none; }
.streak.sight { height: 2px; background: linear-gradient(90deg, #0000, var(--tone-seer), #fff); box-shadow: 0 0 8px var(--tone-seer); }
.pop.grew { color: #ff8a4a; font-size: 1.2rem; }
.pop.burped { color: #9bd16a; font-size: 1.4rem; letter-spacing: .04em; }
/* whom an effect lands on: its own icon in its own colour, after a small arrow */
.ic.who { font-size: .95em; min-width: 1em; }
.chip small.to { opacity: .55; margin: 0 1px; }
/* a body with no picture wears its identity: its icon on its own colour */
.body.wears, .face.wears { background: color-mix(in srgb, var(--tone) 44%, #1c1a24); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tone) 70%, #0000); }
.body.wears .ic, .face.wears .ic { font-size: 1.25em; color: color-mix(in srgb, var(--tone) 30%, #fff); text-shadow: 0 2px 6px #0008; }
#foe .body.wears .ic { font-size: 1.6em; }
#foe .body.wears { background: color-mix(in srgb, var(--tone) 44%, #1c1a24); }
/* the castle keeps its things: what an option pushes out of a bag, a pile's count, two things side by side before a choice */
.pushes { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 999px; border: 1px dashed var(--warn); color: var(--warn); font-size: .78rem; }
.spare { display: inline-flex; align-items: center; gap: 2px; opacity: .55; font-size: .78rem; }
.pushes .chip { padding: 0 4px; background: none; font-size: .78rem; }
.chip.pile { padding: 1px 6px; background: #00000050; font-weight: 700; }
.compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--soft); }
.compare > .head { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--dim); }
.compare > .side ~ .side { grid-column: 3; }
.compare .side { display: grid; gap: 4px; min-width: 0; padding: 6px; border-radius: 8px; background: #00000030; }
.compare .side.in { border: 1px solid var(--heal); }
.compare .side.out { border: 1px solid var(--warn); }
.compare .marks { display: flex; flex-wrap: wrap; gap: 3px; }
.compare .marks .chip { padding: 1px 5px; font-size: .74rem; }
.keep .words small { display: block; margin-top: 2px; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: .72rem; color: var(--dim); text-align: center; }

/* a window that is not wide: the top line keeps to what changes, the words wait under the pointer */
@media (max-width: 1139px) {
  #top .chip small, .pace button:not(.chosen) { display: none; }
}
/* a narrow window (a phone held upright): the rail lies across the top of the deck as icons, the open tab alone says its name; the column that ends the turn lies under the pane */
@media (max-width: 719px) {
  #top .chip small, .pace button:not(.chosen), #utils .tab span, .pace > .ic { display: none; }
  #top { flex-wrap: wrap; align-content: flex-start; gap: 4px; height: 62px; padding-right: 44px; }
  #top .chip { padding: 3px 7px; font-size: .86rem; }
  #top .sep { margin: 0 1px; }
  #top .grow { flex-basis: 0; }
  #top.least .chip { padding: 3px 5px; }
  #top.least .sep { margin: 0; }
  .pace { padding: 0 2px; }
  #wait > .chip.named b, #wait .waited > .chip.named b, #wait .word, #wait .owes { display: none; }
  .fighter .name { font-size: .7rem; }
  #deck { --deck: clamp(232px, 40dvh, 330px); grid-template-columns: minmax(0, 1fr); grid-template-rows: 36px minmax(0, 1fr) auto; gap: 5px; }
  body[data-scene="castle"] #deck { --deck: clamp(260px, 52dvh, 460px); }
  body[data-scene="over"] #deck { --deck: clamp(260px, 54dvh, 480px); }
  #tabs { flex-direction: row; }
  #tabs .tab { flex: 0 1 44px; min-width: 30px; justify-content: center; padding: 2px 6px; }
  #tabs .tab span { display: none; }
  #tabs .group { flex-direction: row; flex: 1 1 auto; }
  #tabs .group > small { display: none; }
  #tabs .tab.open, #tabs .tab.act { flex: 1 1 auto; }
  #tabs .tab.open span, #tabs .tab.act span { display: block; flex: 0 1 auto; }
  #pane { padding: 4px 8px 6px; }
  .pane-head { height: 22px; margin-bottom: 4px; }
  .fit button { min-height: 30px; padding: 2px 8px; }
  .sub { gap: 4px; }
  #side { gap: 4px; }
  #utils { flex-direction: row; }
  #utils .tab { flex: 1 1 0; justify-content: center; min-height: 30px; }
  #go { flex-direction: row; }
  #go button.primary { flex: 1 1 0; min-height: 42px; }
  #seats { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .seat { flex-direction: row; text-align: left; min-height: 0; padding: 10px 12px; }
  .seat .face { width: 52px; height: 66px; font-size: 1.5rem; flex: none; }
  .seat .about { -webkit-line-clamp: 3; }
  #replay { flex-wrap: wrap; }
  #replay .players { display: none; }
}
@media (max-height: 560px) {
  #stage { padding-top: 34px; }
  .fighter .tags { height: 20px; }
  #foe .fighter::after { min-height: 20px; }
}
#top .chip .chip { padding: 0; border: 0; background: none; }
.lead.known > small { display: none; }
.players { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 8px; flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: .85rem; }
.players .who { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.players small { color: var(--dim); margin-right: 8px; }
#language { position: fixed; top: 6px; right: 6px; z-index: 30; min-height: 28px; padding: 2px 8px; font-size: .75rem; opacity: .75; }
#language:hover { opacity: 1; }

/* the answer to a pick (play.ts `tabledOf` · `land`): the choice of the turn lies face down before its hero, a card's back, until the turn closes and turns it over (motion.ts) ·
   the seat's own is edged in its colour and shows what it chose · it sits inside its figure: the stage grows by nothing */
.tabled { position: absolute; z-index: 3; top: calc(var(--tall) * .4); right: 0; width: clamp(18px, calc(var(--tall) * .3), 34px); aspect-ratio: 5 / 7; display: grid; place-items: center; rotate: 9deg; border-radius: 4px;
  border: 2px solid #ffffffb8; background: repeating-linear-gradient(45deg, #3a2f52 0 4px, #2a2240 4px 8px); box-shadow: 0 3px 8px #000b; font-size: clamp(.6rem, calc(var(--tall) * .15), 1.05rem); }
.tabled.mine { border-color: var(--mine); box-shadow: 0 3px 8px #000b, 0 0 10px var(--mine); }
/* the monster's card lies on its side that faces the line, leaning the other way */
.tabled.foe { right: auto; left: 0; rotate: -9deg; }
.tabled.ghost { z-index: 30; pointer-events: none; font-size: .9rem; }
/* a price in the colours of what pays it · a material the stock is short of burns on the card */
.card .cost span { border-color: var(--tone, var(--card-edge)); }
.card .cost span .ic { color: var(--tone); opacity: 1; }
.card .cost span.short { background: #4a1612; border-color: var(--hp); color: #ffb3a8; animation: short 1.1s ease-in-out infinite alternate; }
.card .cost span.short .ic { color: #ffb3a8; }
@keyframes short { to { box-shadow: 0 0 10px var(--hp); } }
/* paid mostly with what the monster is known to be weak to: the card glows in that material's colour */
.card.weak { border-color: var(--weak); box-shadow: 0 0 14px var(--weak); }
.card .weak-mark { position: absolute; top: -10px; right: -4px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: var(--weak); color: #1b1608; font-size: .66rem; font-weight: 800; }
.card .weak-mark .ic { color: #1b1608; }
/* the stock's counter of a material the card under the pointer costs */
#top .chip.lit { border-color: var(--tone); box-shadow: 0 0 10px var(--tone); }
#top .chip.lit.short { border-color: var(--hp); box-shadow: 0 0 10px var(--hp); }
/* the goal in sight (scenes/fight.ts `road`): which leg, which fight, the door at the end and what it counts · small, over the figures, in the room the stage keeps on top */
#road { position: absolute; top: 3px; left: 8px; z-index: 2; display: flex; align-items: center; gap: 4px; max-width: min(62%, 460px); height: 20px; overflow: hidden; }
#road .chip { padding: 1px 8px; font-size: .74rem; background: #00000048; flex: none; }
#road .chip small { font-size: .64rem; }
#road .chip .chip { padding: 0 2px; background: none; }
#road > .ic.to { font-size: .7rem; color: var(--dim); flex: none; }
@media (max-width: 719px) { #road .chip small { display: none; } }
@media (max-height: 560px) { #road { top: 0; height: 16px; } #road .chip { font-size: .66rem; padding: 0 6px; } }
/* what a part marks on a card of the hand (ui.ts `card`): a combo it is a missing piece of in gold, a curse in red · the one that would close a curse beats */
.card .marks { display: flex; flex-wrap: wrap; gap: 3px; min-height: 0; overflow: hidden; }
.card .marks .chip { padding: 1px 6px; font-size: .72rem; background: #00000055; }
.card .marks .chip.closes { box-shadow: 0 0 0 1px currentColor; animation: short 1s ease-in-out infinite alternate; }

/* a number of the hand that is more than its card says (the hero's place · the monster's weakness): an arrow beside it, why under the pointer */
.chip.id.more b::after { content: "\F0737"; font-family: "MH Icons"; margin-left: 2px; font-size: 1em; opacity: .9; }
/* the monster's weakness, told as it is: beside the stock, in the material's colour */
.chip.weak-known { box-shadow: inset 0 0 0 1px var(--tone); }
/* an ask another seat cast in the open (a vote for a swap of places): the seat's line offers to join it with one press, the tab and the two it names say a vote is on */
@keyframes asked { 50% { background: #ffffff2e; } }
#wait .asked { display: inline-flex; align-items: center; gap: 6px; padding: 1px 4px 1px 9px; border-radius: 999px; background: var(--soft); color: var(--ink); animation: asked 1.4s ease-in-out infinite; }
#wait .asked .join { min-height: 22px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--mine); color: #1b1608; font-weight: 700; font-size: .8rem; }
.tab.asked, button.asked { animation: asked 1.4s ease-in-out infinite; }
.fighter .tags .chip.ask { color: var(--mine); animation: asked 1.4s ease-in-out infinite; }
/* an ask that takes something from another seat (a sacrifice takes its turn): set off, so it is not pressed for a card */
button.grave { border-color: #d8473a99; box-shadow: inset 3px 0 0 #d8473a; }
/* the cards tab: one line a card · how many, its name, what it does in words, what it costs at the line's end */
.codex { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: .86rem; }
.codex > .n { min-width: 20px; color: var(--dim); font-size: .76rem; }
.codex .does { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.codex .does .chip, .codex .bag .chip { background: none; padding: 0 2px; }
.codex .grow { flex: 1; }
.codex .free { color: var(--dim); font-size: .72rem; }
.row.about { grid-template-columns: auto minmax(40px, auto) 1fr; }
.row.about .value small { color: var(--ink); font-size: .78rem; line-height: 1.3; white-space: normal; }
/* a narrow window: the call says who ∧ what by icons, and whom the table waits for steps back while a call stands: the one thing that waits for an answer keeps its button */
@media (max-width: 720px) {
  #wait .asked > small, #wait .asked .chip.named b { display: none; }
  #wait.calling .waited > .word, #wait.calling > .chip.named b, #wait.calling .waited > .chip.named b, #wait.calling .waited > .ic { display: none; }
}
/* the teacher's board (screens/web/parts/lesson.ts): this turn's step over its head, where the eye already is · it takes its room from the body, never from the page */
#foe .fighter .sign { position: relative; align-self: stretch; margin-bottom: 9px; padding: 6px 10px; border: 2px solid #7f9a6a; border-radius: 8px; background: #22382b; color: #eef3e6; font-size: .84rem; font-weight: 600; line-height: 1.3; text-align: center; overflow-wrap: break-word; }
#foe .fighter .sign::after { content: ""; position: absolute; bottom: -9px; left: 50%; translate: -50% 0; border: 8px solid transparent; border-bottom: 0; border-top-color: #7f9a6a; }
#foe .fighter:has(> .tags)::after { content: none; }
.fighter .tags .chip.teacher { background: #7f9a6a; color: #10180f; font-weight: 700; }
.fighter .tags .chip.teacher small { font-size: .7rem; }
@media (max-width: 719px) { #foe .fighter .sign { padding: 3px 5px; font-size: .66rem; line-height: 1.25; margin-bottom: 7px; } }
.speaker { min-height: 30px; padding: 2px 8px; }
.speaker.chosen { color: var(--mine); }
.loud-board { position: fixed; z-index: 40; display: grid; grid-template-columns: 1fr auto; align-items: stretch; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--soft); box-shadow: 0 10px 30px #0008; min-width: 250px; }
.loud-knobs { display: grid; gap: 8px; }
.loud-mute { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 64px; padding: 6px 8px; border: 1px solid var(--soft); border-radius: 10px; font-size: .78rem; }
.loud-mute .ic { font-size: 1.4rem; }
.loud-mute.chosen { color: var(--mine); border-color: var(--mine); }
.loud-row { display: grid; grid-template-columns: 20px 74px 1fr 40px; align-items: center; gap: 8px; font-size: .85rem; }
.loud-row .ic { font-size: 1.1rem; color: var(--mine); }
.loud-row.off .ic, .loud-row.off .loud-n { color: var(--dim); }
.loud-row input { width: 100%; accent-color: var(--mine); }
.loud-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--dim); }
/* guide.ts · the first walk: a ring round one slot ∧ a small card beside it · the veil lets nothing through but the card's two buttons */
.guide { position: fixed; inset: 0; z-index: 70; }
.guide-ring { position: fixed; border: 2px solid var(--gold, #e8c46a); border-radius: 10px; box-shadow: 0 0 0 9999px #0009; transition: left .25s, top .25s, width .25s, height .25s; pointer-events: none; }
.guide-card { position: fixed; max-width: min(320px, 92vw); padding: 10px 12px; border-radius: 10px; background: #0b0f14; border: 1px solid var(--line); display: grid; gap: 6px; font-size: .9rem; line-height: 1.35; }
.guide-card p { margin: 0; }
.guide-card .row { display: flex; gap: 8px; justify-content: flex-end; }
.guide-card .row button { width: auto; }
.guide-card .count { opacity: .6; }
/* an ask about two heroes stands over their figures: the icon to pick ∧ the votes cast, who cast them («oylar da … yukarıda gözüksün») */
.fighter .over-head { position: absolute; bottom: calc(100% + 26px); left: 50%; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 3; }
.fighter .over-head .pair { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; background: #2a2f36; border: 2px solid #c9c4bb; color: #e8e2d6; font-size: 1.1rem; }
.fighter .over-head .pair.armed, .fighter .over-head .pair.chosen { background: var(--mine); color: #1b1608; border-color: var(--mine); }
.fighter .over-head .pair.to { animation: pulse 1s infinite alternate; }
.fighter .over-head .voted { display: flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; background: #000000a0; font-size: .74rem; white-space: nowrap; }
.fighter .over-head .voted.mine { outline: 2px solid var(--mine); }
/* a card asked over a hero (a sacrifice) wears what the ask adds as icons ∧ numbers, the words wait under the pointer: the card has no room for them */
#hand .card .marks.by small { display: none; }
[data-aim][hidden] { display: none; }

/* card-view · one card shape wherever a card is shown (the hand, the fallen cards, a hero's deck, a made thing): the hand's rules above draw it, these set it where it stands outside the hand */
.card .families { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; pointer-events: auto; }
.card .families span { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 10px; background: #16301f; border: 2px solid var(--tone, var(--card-edge)); }
.card .families .ic { font-size: .72rem; color: var(--tone); }
.card .count { position: absolute; top: -10px; right: -6px; padding: 1px 7px; border-radius: 999px; background: var(--card-edge); color: #10201a; font-size: .74rem; font-weight: 800; }
/* a made thing is a card of no deck: steel-edged, its place where a card wears its cost says it is held */
.card.made { --card-edge: #8796a5; background: linear-gradient(#2e3842 0 55%, #1f262d 55%); }
.card.made .cost span { background: #1b2228; }
.card .marks small.dim { color: var(--dim); font-size: .7rem; }
/* the cards a tap opens (a hero's deck · a made thing), beside what was tapped */
.tip.pin.sheet { max-width: min(720px, 94vw); padding: 8px 10px 10px; }
.sheet-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sheet-cards { display: flex; flex-wrap: wrap; gap: 14px 10px; padding: 16px 4px 0; }
.sheet-cards .card { flex: 0 0 124px; height: 172px; margin: 0; cursor: default; }
.tap { cursor: pointer; }
.sheet-cards .card.made { height: 196px; }

/* fan (screens/web/fan.ts) · several cards on one strip, wherever they stand (the hand · the things held · the fallen cards ∧ the deck given up for one):
   apart while the strip has room, then each a little further over the one before, so n cards fill the strip and never pass it · the card under the pointer ∨ chosen comes to the front ∧ rises */
.fan { --w: clamp(84px, 30cqw, 150px); --gap: 8px; position: relative; display: flex; align-items: flex-start; justify-content: center; align-self: stretch; flex: 1 1 0; min-width: 0; container-type: inline-size; }
.fan > * { flex: 0 0 var(--w); width: var(--w); min-width: 0; max-width: none; margin: 0 0 0 clamp(calc(10px - var(--w)), calc((100cqw - var(--n) * var(--w)) / max(var(--n) - 1, 1)), var(--gap)); z-index: var(--i); translate: 0 var(--lift, 0px); transition: transform .15s, translate .15s, margin .2s, right .22s ease-out; }
.fan > :first-child { margin-left: 0; }
.fit .fan > button { max-width: none; }
/* a held hand turns its outer cards outwards: the strip keeps room for their corners · the hand lies under the pile when the pile opens over it */
.fan.tilt { padding: 0 24px; }
/* the arc: the hand opens as a held hand does · a card stands at `--u` (−1 the left end · 0 the middle · 1 the right end) of the hand's half span `--span`, turns u × `--most` ∧ sinks u² × `--sink`:
   the more cards the wider the fan opens (4° a card, 18° at most at each end), so a full hand reads as a deep fan, not a flat row («masa 20 kartı daha çok sevdim») ·
   few cards stand apart (`--gap`), the more there are the closer they lie once the strip is full · the span keeps the outer cards' turned corners inside the strip ·
   the ends sink into the room under the cards ∧ a fifth of a card past it, as a hand held low does (a foot may pass the window's bottom edge, a side never passes the strip) · the card under the pointer ∨ chosen stands straight ∧ rises to be read */
.fan.tilt > * { --mid: max((var(--n) - 1) / 2, .5); --u: calc((var(--i) - (var(--n) - 1) / 2) / var(--mid));
  --h: min(200px, calc(100cqh - 30px)); --room: calc(100cqh - var(--h) + var(--h) / 5);
  --most: min(calc(var(--mid) * 4deg), 18deg);
  --reach: calc(50cqw + 24px - var(--w) / 2 - var(--h) * sin(var(--most)));
  --span: max(0px, min(calc(var(--mid) * (var(--w) + var(--gap))), var(--reach)));
  --sink: max(0px, min(calc(var(--span) * tan(var(--most)) / 2), calc(var(--room) - var(--w) / 2 * sin(var(--most)))));
  position: absolute; top: 0; left: calc(50% - var(--w) / 2 + var(--u) * var(--span)); margin: 0;
  transform-origin: 50% 100%; rotate: calc(var(--u) * var(--most)); translate: 0 calc(var(--lift, 0px) + var(--u) * var(--u) * var(--sink));
  transition: rotate .15s, transform .15s, translate .15s, left .2s; }
.fan.tilt > :is(:hover:not(:disabled), :focus-visible, .chosen, .aiming) { rotate: 0deg; }
.fan.spread { z-index: 1; }
.fan > :is(:hover:not(:disabled), :focus-visible, .chosen, .aiming) { z-index: 40; }
.fan > :is(.chosen, .aiming) { --lift: -10px; }
.fan > :hover:not(:disabled) { translate: 0 calc(var(--lift, 0px) - 12px); }
/* the pile: the things a seat holds at the hand's right edge, one sliver each and the top one whole · under the pointer ∨ at a tap it opens towards the hand, over it */
#hand { --thing-w: 112px; }
.fan.pile { --w: var(--thing-w); --closed: 14px; --step: var(--closed); flex: none; width: calc(var(--w) + (var(--n) - 1) * var(--closed)); margin-left: 14px; z-index: 5; }
.fan.pile > * { position: absolute; top: 0; right: calc((var(--n) - 1 - var(--i)) * var(--step)); margin: 0; height: min(176px, calc(100cqh - 30px)); }
.fan.pile:hover, .fan.pile.open { --step: min(calc(var(--w) * .92), calc(70vw / max(var(--n) - 1, 1))); }
@media (max-width: 719px) {
  #hand { --thing-w: clamp(70px, 22vw, 112px); }
}

/* ── the face of a card (screens/web/card-view) · top to bottom: its name · its picture · what the parts mark on it · what it does, a row each ·
   the colour of what it first does (`--kind`) stands on its edge ∧ behind its picture: a hand is read by colour before a word is */
.card { border-color: color-mix(in srgb, var(--kind, var(--card-edge)) 62%, #1b2420); box-shadow: 0 0 0 1px #0006, 0 0 10px -4px var(--kind, transparent); }
/* the name: as large as the card is wide allows, two lines at most · a name that still does not fit grows smaller (card-view `fitNames`), it never pushes the picture out of the card
   («Kan Bedeli yazısı çok büyük kalmış kartın içerisinde … sığmıyorsa fontu küçült») */
.card .title { text-align: center; flex: 0 1 auto; max-height: 2.4em; }
.fan .card .title { font-size: clamp(11px, calc(var(--w) * .115), 17px); }
/* the picture is the card's icon, large: the name does not wear it a second time */
.card .title .chip.named > .ic { display: none; }
.card .art { flex: 1 1 0; min-height: min(26%, 44px); margin: 0 -2px; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; container-type: size;
  background: radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--kind) 36%, transparent) 0, color-mix(in srgb, var(--kind) 10%, transparent) 62%, #0003 100%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kind) 30%, transparent); }
.card .art .ic { font-size: min(64cqh, 56cqw); line-height: 1; color: var(--kind); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--kind) 60%, transparent)); }
/* a card too short for a picture keeps a band of its colour: an icon cut in half says nothing */
@container (max-height: 22px) { .card .art .ic { display: none; } }
.card.skinned .art { background: none; box-shadow: none; }
.card.skinned .art .ic { display: none; }
/* what it does: one row for each thing · icon · number (∧ what a held thing lends) · whom it lands on at the right edge · why the number grew on a line of its own under it:
   a long row breaks at one place only, never in the middle of «13 önde +? →» */
.card .line { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; margin-top: 0; flex: 0 1 auto; min-height: 0; overflow: hidden; }
/* the rows are as large as the card is wide allows: on a narrow card the letters grow smaller, a row is not broken before whom it lands on */
.fan .card .line { font-size: clamp(10px, calc(var(--w) * .092), 14.5px); }
.fan .card .line .chip { font-size: 1em; padding: 2px 4px; gap: 0 3px; }
.card .line .chip { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; width: 100%; max-width: 100%; box-sizing: border-box; padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
.card .line .chip::after { content: ""; flex-basis: 100%; height: 0; order: 1; }
.card .line .chip > .ic:first-child { flex: none; width: 1.2em; text-align: center; }
.card .line .chip > .to { margin-left: auto; opacity: .7; }
.card .line .chip > .lift { order: 2; margin-left: 0; }
/* the card under the pointer ∨ chosen ∨ offered on the sheet breathes in its own colour («Kartların üstünde mesela efekt var. Türüne göre mesela renk»): a card that only lies in the hand does not move,
   a hand that glowed all the time would say nothing ∧ draw the eye off the stage */
@keyframes kind-glow { from { box-shadow: 0 0 0 1px #0006, 0 0 10px -2px var(--kind, transparent); } to { box-shadow: 0 0 0 1px #0006, 0 0 24px 3px var(--kind, transparent); } }
.card:is(:hover:not(:disabled), :focus-visible, .chosen, .aiming), .choose .offered .card { animation: kind-glow 1.1s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .card { animation: none !important; } }

/* ── what a card says, beside it (screens/web/card-notes) · one box, a row for each thing the card carries, each under the same icon in the same colour the card wears
   (the owner, 2026-11-15: lab/drafts/cekis-koyun-birlestirme bölüm 1 «imleçte tek kutu») */
.notes { position: fixed; z-index: 62; display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 6px; width: max-content; max-width: 94vw; pointer-events: none; }
.notes[hidden] { display: none; }
.notes:not([hidden]) { width: min(330px, 60vw); box-sizing: border-box; gap: 0; padding: 4px 12px; border-radius: 10px; background: #0b0f14f5; border: 1px solid var(--line); box-shadow: 0 6px 18px #0009; flex-wrap: nowrap; overflow: hidden; }
.note { box-sizing: border-box; padding: 7px 0 8px; }
.note + .note { border-top: 1px solid #ffffff14; }
.note .head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 3px; font-weight: 700; font-size: .86rem; color: var(--tone, var(--ink)); }
.note .head .piece { position: static; display: inline-flex; align-items: center; gap: 4px; height: auto; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; animation: none; font-size: inherit; color: inherit; white-space: normal; }
.note .head small { font-size: inherit; color: inherit; }
.note p { margin: 0; font-size: .8rem; line-height: 1.34; color: var(--ink); }
.note p .chip { display: inline-flex; padding: 0 2px; background: none; font-size: inherit; vertical-align: baseline; white-space: nowrap; }
.choose-head h2 .chip { padding: 0; background: none; font-size: inherit; gap: 8px; }
.choose-head h2 .chip b { color: inherit; }

/* ── the sheet of the fallen cards (screens/web/parts/deck `over`) · over the stage ∧ the deck, under the top line: «kart seç», the cards large, the two answers under them ·
   it is a slot like the others: its size is the table's, what stands in it is sized from it ∧ never pushes it open */
#table { position: relative; }
#choose { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; border-radius: var(--radius); background: radial-gradient(ellipse at 50% 38%, #1a1528f0 0, #0b0912f7 78%); container-type: size; }
#choose[hidden] { display: none; }
.choose { --choose-w: clamp(96px, min(30cqh, 28cqw), 210px); --own-w: clamp(60px, min(13cqh, 14cqw), 96px); flex: 1 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 2.6cqh, 24px); padding: clamp(8px, 2.5cqh, 24px) 16px; overflow: hidden; }
.choose:has(.mine) { --choose-w: clamp(90px, min(21cqh, 24cqw), 170px); }
.choose-head { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 100%; }
.choose-head h2 { margin: 0; padding: 6px 38px; border-radius: 10px; font-size: clamp(1.05rem, 4.4cqh, 1.7rem); letter-spacing: .05em; background: linear-gradient(#40375a, #2b2440); border: 1px solid var(--line); box-shadow: 0 4px 0 #0006; }
.choose-head .why { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; max-height: 3.1em; overflow: hidden; font-size: .8rem; color: var(--dim); }
.choose .fan.offered { --gap: clamp(10px, 3cqw, 30px); flex: 0 1 auto; align-self: center; width: min(100%, calc(var(--n) * var(--w) + (var(--n) - 1) * var(--gap))); min-height: 0; padding-top: 16px; }
.choose .offered .card { height: min(max(calc(var(--w) * 1.42), 190px), 56cqh); padding: 24px 10px 10px; }
.choose:has(.mine) .offered .card { height: min(calc(var(--w) * 1.42), 36cqh); }
.choose .fan.offered .card .title { font-size: clamp(12px, calc(var(--w) * .11), 19px); }
.choose .fan.offered .card .line { font-size: clamp(10px, calc(var(--w) * .085), 15.5px); }
.choose .offered .card.chosen { --lift: -14px; border-color: var(--mine); }
/* the card that wears the monster's efsun (engine/laws/keen-pick): the lure's colour round it ∧ its name under it · in the hand the chip stays under it until it is played */
.card.efsun { box-shadow: 0 0 0 2px var(--tone-lure), 0 0 22px color-mix(in srgb, var(--tone-lure) 53%, transparent); }
.chip.efsun { --tone: var(--tone-lure); color: var(--tone-lure); }
.choose .mine { flex: 0 1 auto; display: flex; align-items: center; gap: 8px; width: min(100%, 940px); min-height: 0; padding-top: 10px; border-top: 1px dashed var(--line); }
.choose .mine .fan { padding-top: 12px; }
.choose .mine .card { height: min(calc(var(--w) * 1.5), 22cqh); padding-top: 18px; }
.choose .give { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--dim); }
.choose-foot { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px; }
.choose-foot button { width: auto; min-height: 42px; padding: 8px 26px; font-weight: 700; }
.choose-foot .skip { background: transparent; color: var(--dim); }
.choose-foot .ok { min-width: 150px; }
/* a watcher's pane: the offered cards as faces, nothing to press */
.fit .offer-row { display: flex; width: 100%; height: 100%; container-type: size; }

/* the stock on the top line: what every card is paid from is read at a glance, its number ∧ its name large enough to stand apart («Ot yazısı sanki tam sığmamış … büyütürsün gerekirse») */
#top .chip[data-id^="material:"] { padding: 6px 13px; gap: 6px; font-size: 1.05rem; }
#top .chip[data-id^="material:"] small { font-size: .82rem; color: var(--ink); opacity: .85; }
/* one move, one line of the log: what a played card did follows its name on the same line, a dot between («Her satır bir hamle olsun») */
#log li .then { margin: 0 5px; color: var(--dim); }
/* the stylist's style under its figure: the letter large in the stylist's colour, the multiplier small beside it, the six rungs of the ladder lit up to where it stands (contracts/style-rank) */
.fighter .held-facts .beat { display: inline-flex; align-items: center; gap: 4px; }
.fighter .held-facts .beat .rank { font-size: .95rem; font-weight: 900; color: var(--tone); min-width: 1.2em; text-align: center; }
.fighter .held-facts .beat .x { font-size: .7rem; opacity: .85; }
.fighter .held-facts .beat .ladder { display: inline-flex; gap: 2px; align-items: flex-end; }
.fighter .held-facts .beat .ladder i { width: 4px; height: 8px; border-radius: 1px; background: #ffffff26; }
.fighter .held-facts .beat .ladder i.on { background: var(--tone); }
.fighter .held-facts .beat .ladder i.at { height: 11px; box-shadow: 0 0 0 1px var(--ink); }

/* one hero's combo book (parts/combo.ts bookOf): a combo a row, the pressed one opens what it does under itself · the book scrolls in its own box, the page never */
.row:has(> .value > .cbook) { grid-template-columns: auto 1fr; width: 100%; }
.row:has(> .value > .cbook) > .value { grid-column: 1 / -1; }
.fit.cols > .row:has(> .value > .cbook) { width: 100%; }
.cbook { display: flex; flex-direction: column; gap: 4px; width: 100%; max-height: min(15rem, 42vh); overflow-y: auto; }
.centry { border: 1px solid #ffffff1c; border-radius: 8px; padding: 4px 8px; background: #0000002e; cursor: pointer; }
.centry.open { border-color: #e2b54a; }
.centry .chead { display: grid; grid-template-columns: minmax(9.5em, auto) 1fr auto; align-items: center; gap: 8px; }
.centry .cname .chip { background: none; padding: 0; font-weight: 700; }
.centry .cseq { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.centry .cstep { display: inline-flex; align-items: center; border-radius: 6px; }
.centry .cstep.done { background: #5fbf6f33; }
.centry .carr { color: var(--dim); }
.centry .cprog { color: var(--dim); font-size: .8rem; }
.centry .cdetail { display: none; flex-direction: column; gap: 2px; border-top: 1px solid #ffffff14; margin-top: 4px; padding-top: 4px; font-size: .82rem; }
.centry.open .cdetail { display: flex; }
.centry .cdetail .dim { color: var(--dim); }
/* the stylist's step under a card (screens/web/parts/stylist-next): the step's icon ∧ the style ladder it leaves, the rungs of the figure's own ladder (.held-facts .beat .ladder) */
.chip.stylist-next .ic { font-size: 1.15em; }
.chip.stylist-next .ladder { display: inline-flex; gap: 2px; align-items: flex-end; margin-left: 3px; }
.chip.stylist-next .ladder i { width: 4px; height: 9px; border-radius: 1px; background: #ffffff26; }
.chip.stylist-next .ladder i.on { background: #f2efe8a0; }
.chip.stylist-next .ladder i.at { height: 12px; background: var(--tone, currentColor); box-shadow: 0 0 5px var(--tone, currentColor); }
.chip.stylist-next.good .ladder i.at { --tone: var(--heal); }
.chip.stylist-next.bad .ladder i.at { --tone: #ef7b6f; }
/* a card's combo star (screens/web/parts/combo): the gold every combo wears when it fires, so the star under a card ∧ the combo's banner read as one thing */
.chip.combo { color: #e2b54a; }

/* where a blow ∨ a gift lands among the three heroes (ui.ts rowStrip): three rungs as the stage stands, the front one on the right, the lit ones in the chip's own tone */
.row-strip { display: inline-flex; gap: 2px; align-items: flex-end; margin-left: 3px; }
.row-strip i { width: 5px; height: 11px; border-radius: 2px 2px 1px 1px; background: #ffffff22; }
.row-strip i.on { background: currentColor; }

/* the top line is icons ∧ numbers at every width: what each one is waits under the pointer (its title) · the owner, 2026-11-15: «Beş kısmı … kişi üzerine gelirse açıklamasını görsün» */
#top .chip small { display: none; }
.pace .rungs { display: inline-flex; gap: 2px; align-items: flex-end; margin-left: 4px; }
.pace .rungs i { width: 4px; height: 11px; border-radius: 1px; background: #ffffff26; }
.pace .rungs i.on { background: var(--mine); }

/* whom the table waits for: the hourglass ∧ the heroes' icons, the names under the pointer (play.ts waitedFor) */
.waited .chip.named b { display: none; }

/* the applause row: the stylist's letter ∧ its ladder, as under its figure (parts/applause) */
.chip.applause-peak { color: var(--tone); }
.chip.applause-peak .ladder { display: inline-flex; gap: 2px; align-items: flex-end; margin-left: 4px; }
.chip.applause-peak .ladder i { width: 4px; height: 8px; border-radius: 1px; background: #ffffff26; }
.chip.applause-peak .ladder i.on { background: currentColor; }
.chip.applause-peak .ladder i.at { height: 11px; }

/* the castle's heroes: each by its icon, a check when ready, an hourglass while at it, then the road (scenes/castle foe) */
.keep .dots { align-items: center; }
.keep .dots .hero { display: inline-flex; align-items: center; gap: 1px; padding: 2px 6px; border-radius: 999px; background: #ffffff10; color: var(--dim); }
.keep .dots .hero.done { color: var(--ink); }
.keep .dots .hero .mark { font-size: .75em; }
.keep .dots .hero.done .mark { color: var(--heal); }
.keep .dots .to, .keep .dots .road { color: var(--dim); }

/* a role's ∨ a flaw's face in the cards tab (ScreenPart.face): rows of icons, the arrow ∨ joining word of every row in one column, the sentence under the pointer */
.about .face { display: grid; grid-template-columns: max-content 12px minmax(0, 1fr); column-gap: 3px; row-gap: 6px; align-items: center; margin-top: 6px; }
.about .face .join { color: var(--dim); text-align: center; font-size: .8rem; }
.about .face .cell { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.about .face .chip { font-size: .74rem; padding: 1px 6px; gap: 3px; }
.about .face .row-strip i { width: 4px; height: 9px; }
.chip .tgt { font-size: .8em; opacity: .8; margin-left: 2px; }
/* a hand card that carries a combo of the hero's own move list glows gold (screens/web/parts/combo `.combo-glow`, an empty mark) */
.card .marks .combo-glow { display: none; }
.card:has(.marks .combo-glow) { border-color: #e2b54a; box-shadow: 0 0 0 2px #e2b54a66, 0 0 22px #e2b54a88; }
