/* The game page (the user, 12.10.2026: the map never hidden; as pg games' board, some of the game beside it and some
   under it). The map at its own size (smaller only when the window is narrower), never in a box of its own: the page
   scrolls. Beside it the side column: the turn, what you do now, the tracks; it stays in view while it fits the
   window (sticky), else it scrolls with the page. Under the map: a column per house, then the log. A phone: the whole
   map at the screen's width, the side column and the rest below it. */
main.game { display: grid; grid-template-columns: minmax(0, 800px) 340px; grid-template-areas: "nav nav" "map side" "under side";
  grid-template-rows: auto auto 1fr; /* the map's row as tall as the map, a taller side column grows the row under it (step 4G) */
  gap: 12px; padding: 10px; justify-content: center; align-items: start; }
main.game > .hint { color: var(--parch); }
.board-wrap { grid-area: map; position: relative; overflow: hidden; border: 1px solid #000; min-width: 0; }
.board { position: relative; background-repeat: no-repeat; background-size: 100% 100%; transform-origin: 0 0; }
.side { grid-area: side; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.side.stick { position: sticky; top: 10px; }
.under { grid-area: under; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.side h1 { font-size: 20px; margin: 0; }
.side .sub { color: var(--dim); margin: 0 0 4px; font-size: 14px; }
#status { font-size: 16px; } #status b { font-variant: small-caps; letter-spacing: .04em; }
.waiting { color: var(--dim); font-size: 14px; }
.maintenance { color: var(--accent); font-weight: bold; margin: 6px 0 0; }
.won { font-size: 17px; font-weight: bold; margin: 4px 0; }
/* The tracks: each track's places, a row per track; then each house's power, supply and castles. */
table.tracks { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
table.tracks th { text-align: left; font-weight: normal; color: var(--dim); font-size: 13px; font-variant: small-caps; letter-spacing: .05em; }
table.tracks td, table.tracks th { padding: 2px 4px; border-bottom: 1px solid var(--hair); }
table.tracks + table.tracks { margin-top: 8px; }
/* ASoS's Claim track: six spaces, 6 first (a token goes on the highest empty one); a token in its house's colours. */
.claimtrack { display: flex; gap: 4px; margin-bottom: 8px; }
.claimtrack .space { flex: 1; min-height: 44px; border: 1px solid var(--rule); background: var(--parch2); text-align: center; }
.claimtrack .n { display: block; color: var(--dim); font-size: 13px; }
.claimtrack .tok { margin: 2px auto 0; display: block; }
.tokens { color: var(--dim); font-size: 14px; margin-top: 6px; }
/* A column per house, under the map (as pg games' faction columns under its map). */
.housecols { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); background: var(--parch);
  color: var(--ink); border: 1px solid var(--rule); }
.house { padding: 8px 10px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); font-size: 14px; }
.house .name { font-variant: small-caps; letter-spacing: .05em; font-size: 16px; }
.house .line { color: var(--dim); }
.house .tracks.over, .house .over { color: #a01e10; }
.myhand { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 16px; font-size: 14px; }
.myhand li { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px solid var(--hair); padding: 1px 0;
  break-inside: avoid; }
.myhand b { font-variant-numeric: tabular-nums; }
#log { list-style: none; padding: 0; margin: 0; font-size: 14px; }
#log li { padding: 3px 0; border-bottom: 1px solid var(--hair); }
#log .at { color: var(--dim); font-size: 13px; }
button.logall { margin-top: 8px; }
@media (max-width: 860px) {
  main.game { grid-template-columns: minmax(0, 1fr); grid-template-areas: "map" "side" "under"; grid-template-rows: none;
    padding: 0 0 12px; grid-template-areas: "nav" "map" "side" "under"; }
  .board-wrap { border-width: 0 0 1px; }
  .side, .under { padding: 0 10px; }
  .side.stick { position: static; }
  .ctext, .count, #say, .house, #log, #log .at { font-size: 14px; }
}
/* The pieces' sizes: the variant's (js/board.js Board(): --uw, --uh, --ow, ...; the old sites' sizes). */
.unit { position: absolute; width: var(--uw, 24px); height: var(--uh, 24px); border-radius: 4px; border: 1px solid #000; color: #fff;
  font: bold 11px/calc(var(--uh, 24px) - 2px) sans-serif; text-align: center; text-shadow: 0 0 2px #000; cursor: default; box-shadow: 0 1px 2px #000; }
.unit.knight { border-radius: 50%; }
.unit.ship { border-radius: 4px 4px 12px 12px; }
.unit.siege { transform: rotate(45deg); }
.unit.routed { opacity: .55; transform: rotate(90deg); }
.order { position: absolute; width: var(--ow, 28px); height: var(--oh, 28px); border-radius: 50%; border: 3px solid; background: #111;
  color: #eee; font: bold 9px/calc(var(--oh, 28px) - 6px) sans-serif; text-align: center; overflow: hidden; }
.order.hidden { background: #333; }
.power { position: absolute; width: var(--pw, 18px); height: var(--ph, 18px); border-radius: 50%; border: 2px solid #000; }
.garrison { position: absolute; width: 22px; height: 22px; background: #ddd; color: #000; border: 2px solid #000;
  font: bold 12px/18px sans-serif; text-align: center; }
/* On a board drawn smaller (a phone), the pieces grow back part of the way, each about its own middle. */
.board.small .unit, .board.small .order, .board.small .power, .board.small .garrison, .board.small .battle-mark { scale: var(--grow); }
svg.hit { position: absolute; left: 0; top: 0; pointer-events: none; }
svg.hit path { fill: none; stroke: none; }
.unit.can-move { cursor: grab; outline: 2px solid #fc3; }
.unit.ally { border-style: dashed; }
.allyask .choices { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.order { cursor: default; }
.order.mine { cursor: pointer; }
.order.star { box-shadow: 0 0 0 2px #fc3; }
.tactics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 6px 0 10px; }
.tactic { display: flex; flex-direction: column; gap: 2px; text-align: left; font-size: 13px; line-height: 1.3; padding: 6px 8px; }
.tactic b { font-size: 14px; }
.tactic span { color: var(--dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tactic.on { outline: 2px solid var(--accent); }
.tcpick { margin-top: 14px; }
.tcnow .choices { display: flex; flex-wrap: wrap; gap: 6px; }
.tctext { font-size: 14px; border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; margin: 4px 0 8px; }
.tctext p { margin: 4px 0 0; }
.house .tc span, .house .al span { border-bottom: 1px dotted var(--dim); }
.tracks.allies td:last-child { text-align: left; }
button.link { appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left;
  text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: var(--dim); cursor: pointer; min-height: 0; }
.tray { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.order.token { position: relative; cursor: grab; }
.order.token.used { opacity: .3; cursor: default; }
.order.march { background: #3a1d1d; } .order.defend { background: #1d2a3a; } .order.support { background: #3a351d; }
.order.raid { background: #2a1d3a; } .order.consolidate { background: #1d3a24; }
.done { font-size: 13px; color: #2f6326; }
.march { margin: 4px 0; }
#say { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--parch); color: var(--ink);
  border: 1px solid var(--rule); box-shadow: inset 0 0 0 3px var(--parch), inset 0 0 0 4px var(--rule), 0 2px 8px #000;
  padding: 10px 16px; z-index: 100; max-width: 90vw; }
/* The battle (js/board.js drawBattle): the count, each step's buttons; the attack's choice of units. */
#battle h2 { color: var(--accent); }
.count { border-collapse: collapse; font-size: 14px; margin: 6px 0; }
.count td, .count th { padding: 2px 10px 2px 0; text-align: left; font-weight: normal; font-variant-numeric: tabular-nums; }
.count tr.total td { border-top: 1px solid var(--line); font-weight: bold; }
.step { margin: 6px 0; }
.step button, .attack button, .texts button { margin: 3px 4px 3px 0; }
.hand { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.card { text-align: left; }
.card.on { outline: 2px solid var(--accent); }
.ctext { font-size: 13px; color: var(--dim); }
.shown { margin: 4px 0; }
.texts label, .pick { display: block; margin: 3px 0; }
.texts input[type=number] { width: 4em; }
.unit.attacking { outline: 2px solid #f44; }
.leader { position: absolute; width: var(--lw, 24px); height: var(--lh, 24px); border-radius: 50%; border: 3px solid; box-sizing: border-box; background: #f6ecd2;
  color: #2a2116; font: 600 9px/1 sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 3; }
.leader b { font-size: 9px; }
.leader.down { background: #2a2116; color: #f6ecd2; }
.leader.can-move { cursor: grab; outline: 2px solid #fc3; touch-action: none; user-select: none; -webkit-user-select: none; }
.board.small .leader { scale: var(--grow); }
/* ASoS's weather: a ring around the weather track's place (js/board.js Board()), an SVG ellipse, gold on a dark line (a
   box-shadow's ring on a rounded box was drawn as a black square by WebKit). */
.weather-mark { position: absolute; width: 44px; height: 32px; pointer-events: none; z-index: 1; }
.weather-mark svg { display: block; }
.board.small .weather-mark { scale: var(--grow); }
.battle-mark { position: absolute; width: 60px; height: 60px; border: 3px dashed #f44; border-radius: 30px; pointer-events: none; }
/* Dragging (js/board.js, Pointer Events): a finger on a piece that can be dragged drags it, not the map. */
.unit.can-move, .order.token:not(.used) { touch-action: none; user-select: none; -webkit-user-select: none; }
.unit.dragging { z-index: 50; cursor: grabbing; box-shadow: 0 4px 10px #000; }
.order.token.ghost { position: fixed; z-index: 60; pointer-events: none; opacity: .9; }
/* A phone: the tray's orders big enough to read and to press. */
@media (max-width: 860px) {
  .tray .order.token { width: 44px; height: 44px; border-radius: 22px; font-size: 13px; line-height: 38px; }
}
/* What is pressed or dragged lies above what is only read: a garrison or a power token under an order, an order under
   a unit (on a phone the pieces are drawn bigger and overlap). */
.garrison, .power { z-index: 1; }
.order { z-index: 2; }
.unit { z-index: 3; }

/* ---- The pictures and the graphical sheets (js/look.js; the user, 13.10.2026: "more graphical and playful, much less
   text"; a menu to the page's parts; a picker between the pieces' styles) ----------------------------------------- */
:root { --gold2: #b8913f; --night: #1a140d; }
/* The menu: sticky at the window's top; on a phone a strip that scrolls sideways inside itself. */
.secnav { grid-area: nav; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 4px 8px; background: var(--head); border: 1px solid var(--headline); box-shadow: 0 2px 6px #0008; min-width: 0; }
.secnav .links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.secnav .links::-webkit-scrollbar { display: none; }
.secnav a { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); text-decoration: none; font-variant: small-caps;
  letter-spacing: .06em; font-size: 15px; padding: 6px 10px; border-radius: 3px; white-space: nowrap; }
.secnav a:hover, .secnav a:focus-visible { background: #3a2f22; }
.artpick { display: flex; gap: 2px; flex: none; }
.artpick button { display: inline-flex; align-items: center; gap: 4px; background: transparent; color: var(--parch); border: 1px solid transparent;
  font-size: 13px; padding: 2px 6px; }
.artpick button.on { border-color: var(--gold2); background: #3a2f22; color: var(--gold); }
.artpick img { height: 20px; width: auto; }
.artpick .drawnk { display: inline-block; width: 16px; height: 16px; border-radius: 8px; border: 1px solid #000; }
#map, #turn, #tracks, #houses, #pacts, #decks, #logsec { scroll-margin-top: 56px; }
@media (max-width: 860px) {
  .secnav { border-width: 0 0 1px; padding: 2px 4px; }
  .secnav a { padding: 8px 8px; font-size: 14px; }
  .artpick span { display: none; }
  .artpick button { padding: 6px 6px; }
  .artpick img { height: 24px; }
}
/* A UI icon (game-icons.net) in the text's colour. */
.ico { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -.15em; background: currentColor; flex: none;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
svg.ico { background: none; }
.sheet h2 .ico { color: var(--gold2); }
.sheet h3 { font-weight: normal; font-variant: small-caps; letter-spacing: .06em; color: var(--accent); font-size: 16px; margin: 10px 0 4px; }

/* The pieces with pictures: no box, a shadow under the picture. */
.unit.pic { border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 1px 1px #000); }
.unit.pic.siege { transform: none; }
.unit.pic.routed:not(.routed-pic) { transform: rotate(90deg); filter: grayscale(.6) drop-shadow(0 1px 1px #000); opacity: .8; }
.unit.pic.routed-pic { opacity: 1; transform: none; }
.unit.pic.ally { outline: 2px dashed var(--hc); outline-offset: 0; }
.unit.pic.can-move { outline: 2px solid #fc3; outline-offset: 1px; }
.unit.pic.dragging { filter: drop-shadow(0 4px 6px #000); }
.order.pic { background-size: cover; background-position: center; background-color: #111; border-width: 2px; }
.order.pic.star { box-shadow: 0 0 0 1px #000; }
.power.pic { border: 0; border-radius: 0; filter: drop-shadow(0 1px 1px #000); }
.garrison.pic { border: 0; background-color: transparent; background-size: contain; background-position: center;
  background-repeat: no-repeat; filter: drop-shadow(0 1px 2px #000); }
.leader.pic { border-width: 2px; border-radius: 4px; background-size: cover; background-position: center; }
.order.token.pic { background-size: cover; }
.tray .order.token.pic { width: 36px; height: 36px; border-radius: 18px; }
@media (max-width: 860px) { .tray .order.token.pic { width: 46px; height: 46px; border-radius: 23px; } }

/* Tooltips: on a desktop the pointer over a thing, on a phone a tap. */
.tip { position: fixed; z-index: 200; max-width: min(400px, calc(100vw - 16px)); background: var(--parch); color: var(--ink);
  border: 1px solid var(--rule); box-shadow: inset 0 0 0 3px var(--parch), inset 0 0 0 4px var(--rule), 0 4px 14px #000a;
  padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.tip p { margin: 4px 0 0; }
.tip .dim, .dim { color: var(--dim); }
.tip .small { max-width: 300px; }
.cardtip { display: flex; gap: 12px; align-items: flex-start; }
.cardtip img { width: 120px; height: auto; border-radius: 6px; flex: none; box-shadow: 0 1px 4px #0008; }
.cardtip .tname { font-variant: small-caps; letter-spacing: .04em; font-size: 16px; }
.cardtip .tline { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 2px 0; }
.cardtip .str { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 11px; background: var(--ink); color: var(--parch); font-weight: bold; }
.westip { display: flex; flex-direction: column; gap: 4px; }
.westip img { width: 240px; max-width: 100%; height: auto; border-radius: 6px; }
@media (max-width: 420px) { .cardtip { flex-direction: column; } .cardtip img { width: 100px; } }
[tabindex="0"] { cursor: help; }
[tabindex="0"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* A house card as a chip: a face from the card, its strength, its sword and fortification icons, a text icon. */
.hcards { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.hc { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px 2px 2px; border-radius: 15px;
  background: var(--parch2); border: 1px solid var(--rule); color: var(--ink); font-size: 14px; line-height: 1; min-height: 30px; }
.hc .face { width: 24px; height: 24px; border-radius: 12px; background-size: 300%; background-position: 50% 30%; border: 1px solid var(--hc, #888); flex: none; }
.hc .str { display: inline-grid; place-items: center; min-width: 18px; height: 18px; font-size: 15px; font-variant-numeric: tabular-nums; }
.hc .ico.sword { color: #8a1c12; } .hc .ico.fort { color: #3e4e60; } .hc .ico.txt { width: 14px; height: 14px; color: var(--dim); }
.cardtip .ico.sword { color: #8a1c12; } .cardtip .ico.fort { color: #3e4e60; }
.hc.s-discard, .hc.s-gone { opacity: .55; background: transparent; }
.hc.s-discard::after, .hc.s-gone::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; border-top: 2px solid var(--accent); transform: rotate(-8deg); }
.hc.s-gone .face { filter: grayscale(1); }
.hc.s-shown { box-shadow: 0 0 0 2px var(--hc), 0 0 6px var(--hc); background: #fff6dc; }
.hc.s-chosen { box-shadow: 0 0 0 2px var(--accent); }
.myhand.hcards { columns: auto; }

/* The turn track. */
.turntrack { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; margin: 6px 0 4px; }
.turntrack .t { position: relative; display: grid; place-items: center; height: 30px; border: 1px solid var(--rule); background: var(--parch2);
  font-size: 13px; color: var(--dim); }
.turntrack .t.past { background: #d6c497; color: var(--rule); }
.turntrack .t.now { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.turntrack .t img { position: absolute; height: 26px; width: auto; opacity: .9; }
.turntrack .t.now b { position: relative; text-shadow: 0 0 3px #000, 0 0 3px #000; font-size: 15px; }

/* The tracks: the Influence tracks with the houses' tokens, the dominance tokens and the stars; the supply track. */
.track { margin: 4px 0 10px; }
.track .tt { display: flex; align-items: center; gap: 6px; font-variant: small-caps; letter-spacing: .05em; color: var(--accent); font-size: 15px; margin-bottom: 3px; }
.track .ttitle { height: 24px; width: auto; }
.track .slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.slot { position: relative; display: flex; flex-direction: column; align-items: center; padding: 2px 0 0; border-radius: 4px; }
.slot .pn { position: absolute; left: 0; top: -2px; font-style: normal; font-size: 13px; color: var(--dim); }
.slot .dom { position: absolute; right: -2px; top: -4px; width: 20px; height: 20px; border-radius: 10px; background: var(--ink); color: var(--gold);
  display: grid; place-items: center; font-size: 13px; box-shadow: 0 1px 2px #0008; }
.slot .stars { display: flex; justify-content: center; min-height: 14px; }
.slot .stars img { width: 13px; height: 13px; }
.slot .stars b { color: var(--gold2); font-size: 13px; }
.tok { display: inline-block; object-fit: contain; vertical-align: middle; }
.tok.tk-influence { filter: drop-shadow(0 1px 2px #0008); }
.tok.drawn { display: inline-grid; place-items: center; border-radius: 50%; border: 2px solid; overflow: hidden; color: var(--parch); font-size: 13px; }
.tok.drawn img { width: 72%; height: 72%; object-fit: contain; }
.tok.drawn.tk-supply { border-radius: 6px; }
.tok.drawn.tk-power { border-radius: 4px 4px 50% 50%; }
.supply .cols { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--rule); background: var(--parch2); }
.supply .col { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0 3px; border-right: 1px solid var(--hair); min-width: 0; }
.supply .col:last-child { border-right: 0; }
.supply .n { display: flex; align-items: center; gap: 1px; font-size: 13px; color: var(--dim); }
.supply .n img { height: 13px; width: auto; }
.supply .stack { display: flex; flex-direction: column; align-items: center; min-height: 26px; }
.supply .stack .tok + .tok { margin-top: -12px; }
.supply .arm { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; }
.supply .arm i { font-style: normal; font-size: 13px; min-width: 13px; text-align: center; border: 1px solid var(--rule); border-radius: 2px; background: var(--parch); line-height: 15px; }
.houserows { display: grid; gap: 2px; margin: 6px 0 10px; }
.hrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 2px 0; border-bottom: 1px solid var(--hair); }
.hrow .who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hrow .sg { width: 20px; height: 20px; }
.val { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.val .ico { color: var(--dim); }
.val .of { color: var(--dim); font-size: 13px; }
.hn { font-weight: bold; }
.wild .wcells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.wild .w { position: relative; display: grid; place-items: center; height: 34px; border: 1px solid var(--rule); background: var(--parch2); font-size: 13px; color: var(--dim); }
.wild .w.last { background: #e6c9b8; }
.wild .w.now { background: var(--ink); color: var(--gold); }
.wild .w img { position: absolute; height: 30px; width: auto; }
.wild .w.now b { position: relative; text-shadow: 0 0 3px #000, 0 0 3px #000; }

/* A house's panel under the map. */
.housecols { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0; }
.house { border-top: 4px solid var(--hc); }
.house.mine { background: #f4e9cd; }
.hhead { display: flex; align-items: center; gap: 8px; }
.hhead .shield { width: 34px; height: auto; flex: none; filter: drop-shadow(0 1px 2px #0008); }
.hhead .shield.drawn { display: grid; place-items: center; width: 34px; height: 40px; background: #2a1f14; border: 2px solid var(--hc); border-radius: 3px 3px 50% 50%; }
.hhead .shield.drawn img { width: 24px; height: 24px; }
.hhead .hname { flex: 1; min-width: 0; }
.hhead .done { display: flex; align-items: center; gap: 3px; }
.hstats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 0; }
.armies { display: inline-flex; gap: 2px; }
.armies i { font-style: normal; font-size: 13px; min-width: 18px; height: 20px; line-height: 18px; text-align: center; border: 1px dashed var(--rule); border-radius: 3px; color: var(--dim); }
.armies i.has { border-style: solid; border-color: var(--ink); background: var(--parch2); color: var(--ink); font-weight: bold; }
.armies i.bad { border-color: #a01e10; color: #a01e10; }
.cardicon { display: inline-block; width: 13px; height: 18px; border: 1px solid var(--ink); border-radius: 2px; background: var(--hc); box-shadow: 2px -2px 0 -1px var(--parch), 2px -2px 0 0 var(--ink); }
.leaders { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.ld { position: relative; width: 36px; height: 36px; border-radius: 4px; overflow: hidden; border: 2px solid var(--hc); background: var(--parch2);
  display: grid; place-items: center; font-size: 13px; }
.ld img { width: 100%; height: 100%; object-fit: cover; }
.ld.hostage { border-color: var(--cell); border-style: dashed; }
.ld.hostage::after { content: "⛓"; position: absolute; right: 0; bottom: 0; background: var(--ink); color: var(--parch); font-size: 13px; line-height: 1; padding: 1px; }
.ld.dead { filter: grayscale(1); opacity: .5; }
.ld.dead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent 46%, var(--accent) 47% 53%, transparent 54%); }
.tacs { display: flex; flex-wrap: wrap; gap: 3px; margin: 6px 0 0; }
.tac { font-size: 13px; padding: 1px 6px; border: 1px solid var(--rule); border-radius: 10px; background: var(--parch2); }
.tac.played { background: var(--hc); color: #fff; text-shadow: 0 0 2px #000; border-color: var(--ink); }
.tac.gone { text-decoration: line-through; opacity: .55; }
.house .al .ally { border-bottom: 1px dotted var(--dim); }

/* The cards: the Westeros decks, the wildling cards, the Tactics cards, the Ally decks. */
.west { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wdeck { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wdeck .roman { font-size: 17px; color: var(--accent); }
.wc, .ac { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 3px;
  background: var(--parch2); }
.wc i, .ac i { font-style: normal; color: var(--dim); font-size: 13px; }
.wc.now { background: var(--ink); color: var(--gold); border-color: var(--ink); box-shadow: inset 4px 0 0 var(--hc, var(--gold2)); }
.wc.now i { color: var(--parch); }
.wild-cards { display: flex; flex-wrap: wrap; gap: 4px; }
.acards td { border-bottom: 1px solid var(--rule); padding-bottom: 6px !important; }
.acards .ac { margin: 2px 3px 0 0; }
.ac.held { background: var(--hc); color: #fff; text-shadow: 0 0 2px #000; border-color: var(--ink); }
.ac.held i { color: #fff; }
.ac.top { box-shadow: 0 0 0 2px var(--gold2); }
.ally.top { border-bottom: 1px dotted var(--dim); }
.credits { margin: 12px 0 0; font-size: 13px; color: var(--dim); }
@media (max-width: 600px) { .west { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .wdeck { flex-direction: row; flex-wrap: wrap; } .wdeck .roman { width: 100%; } }
/* Joining and switching houses (lib/seating.php). */
.join { margin-top: 8px; }
.joinbtn { font-size: 16px; padding: 6px 16px; background: var(--accent); color: var(--parch); border-color: var(--ink); }
.swapbtns { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 0 0; }
.swapline { padding: 2px 0; border-bottom: 1px solid var(--hair); }
/* The Pacts pane (js/pacts.js): a card per promise, its house's colour down its side; the open ones first. */
.secnav .badge { font-style: normal; font-size: 13px; line-height: 18px; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--parch); text-align: center; margin-left: 2px; }
.pactalert { margin: 8px 0 0; }
.pactalert a { display: inline-flex; align-items: center; gap: 6px; font-weight: bold; }
.newpact { margin: 4px 0 8px; }
.pactform { display: grid; gap: 6px; padding: 8px 10px; margin: 4px 0 10px; border: 1px solid var(--rule); background: var(--parch2); }
.pactform textarea { font: inherit; width: 100%; background: var(--parch); color: var(--ink); border: 1px solid var(--rule); border-radius: 3px; padding: 4px 8px; resize: vertical; }
.pactform .to { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pactform .to > span { color: var(--dim); margin-right: 4px; }
.tochip { border-left: 4px solid var(--hc, var(--rule)); }
.tochip.on { background: var(--ink); color: var(--parch); }
.pactform .secret.off { color: var(--dim); }
.pactform .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.go { background: var(--accent); color: var(--parch); border-color: var(--ink); }
.err { color: #a01e10; }
.pacts { display: grid; gap: 8px; }
.pact { border: 1px solid var(--rule); border-left: 5px solid var(--hc); background: var(--parch); padding: 6px 10px; min-width: 0; }
.pact .head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pact .head .ico { color: var(--hc); }
.pact .head .at { margin-left: auto; color: var(--dim); font-size: 13px; }
.pact .what { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pact .xch { color: var(--ink); }
.pact .tag { display: inline-block; font-size: 13px; background: var(--ink); color: var(--parch); padding: 1px 8px; border-radius: 3px; margin-top: 3px; }
.pact .tag b { color: var(--gold) !important; }
.pact .state { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.pact .ok { color: #2f6326; } .pact .no { color: #a01e10; } .pact .wait { color: var(--dim); } .pact .by { color: var(--dim); }
.pact .btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.pact.askme { box-shadow: 0 0 0 2px var(--accent); }
.pact.done .what, .pact.declined .what { text-decoration: line-through; text-decoration-color: var(--accent); opacity: .7; }
.pact.declined { background: transparent; }
