/* Waaagh! Legion, look B "Field orders" (Ray's pick of three, 2026-11-29): typed orders on khaki paper, olive
   bars, ink, and stamps. Made for an iPad on its side or a laptop; it folds to fewer columns below that. */

/* War's lesson: a display rule beats the hidden attribute, so this comes first and wins. */
[hidden] { display: none !important; }

:root {
  --paper: #d9d1bb; --sheet: #f2ecdb; --card: #f7f2e4; --edge: #b9ae92; --rule: #cfc6ae;
  --olive: #3f4a26; --olive2: #4f5d2f; --ink: #22231d; --dim: #6a6b5c; --faint: #9c9277;
  --red: #b23a26; --blue: #2c5aa0; --warn: #8a4f0c; --warnbg: #f3e2c0; --good: #4f5d2f;
  --head: 'Oswald', 'Arial Narrow', sans-serif; --mono: 'Courier Prime', 'Courier New', monospace;
  --body: 'Source Sans 3', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.4; }
button, select, input { font: inherit; color: inherit; }
a { color: var(--blue); }

/* ── The bar ── */
.lg-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 56px; background: var(--olive); color: #efe9d6; }
.lg-brand { font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: .2em; color: #efe9d6; text-decoration: none; }
.lg-nav { display: flex; gap: 4px; }
.lg-nav a, .lg-nav button { font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #cdd3b4; background: none; border: 1px solid transparent; padding: 6px 10px; border-radius: 3px; text-decoration: none; cursor: pointer; }
.lg-nav a.on, .lg-nav a:hover, .lg-nav button:hover { border-color: #cdd3b4; color: #efe9d6; }
.lg-who { margin-left: auto; display: flex; gap: 8px; align-items: baseline; }
.lg-who b { font-family: var(--head); font-weight: 600; font-size: 16px; letter-spacing: .05em; }
.lg-top .lg-mono { color: #cdd3b4; }
.lg-waaagh { margin-left: auto; font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #efe9d6; text-decoration: none; padding: 5px 10px; border: 1px solid #8a956a; border-radius: 3px; white-space: nowrap; }
.lg-who + .lg-waaagh { margin-left: 0; }
.lg-waaagh:hover { border-color: #efe9d6; }

.lg-main { padding: 16px 18px 40px; max-width: 1500px; margin: 0 auto; }
.lg-mono { font-family: var(--mono); font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--dim); }
.lg-note { font-family: var(--mono); font-size: 12px; color: var(--olive2); line-height: 1.45; }
.lg-err { color: var(--red); font-family: var(--mono); }
.lg-msg { background: var(--warnbg); border: 1px solid var(--warn); color: var(--warn); padding: 8px 12px; font-family: var(--mono); font-size: 13px; border-radius: 3px; }
.lg-empty { font-family: var(--mono); font-size: 13px; color: var(--dim); padding: 14px; border: 2px dashed var(--faint); border-radius: 3px; }
.lg-title { font-family: var(--head); font-weight: 700; font-size: 26px; letter-spacing: .08em; text-transform: uppercase; }
.lg-titlerow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
/* Everyone else's armies, under your own in the lobby (2026-11-29: any player plays any army). */
.lg-others { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--faint); flex-wrap: wrap; }
.lg-others .lg-title { font-size: 20px; }
.lg-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.lg-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lg-panel { background: var(--sheet); border: 1px solid var(--edge); border-radius: 3px; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; box-shadow: 0 1px 0 var(--edge); min-width: 0; }
.lg-narrow { max-width: 420px; margin: 40px auto; }
.lg-h { font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .15em; text-transform: uppercase; color: var(--olive2); display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px dashed var(--edge); padding-bottom: 5px; }
.lg-h > span:last-child:not(:first-child) { font-family: var(--mono); font-size: 11px; letter-spacing: .03em; color: var(--dim); text-transform: none; }

.lg-btn { font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .13em; text-transform: uppercase; border: 2px solid var(--ink); color: var(--ink); background: var(--sheet); border-radius: 3px; padding: 9px 13px; cursor: pointer; text-decoration: none; text-align: center; min-height: 40px; }
.lg-btn:hover { background: var(--card); }
.lg-btn.lg-fill { background: var(--ink); color: var(--sheet); }
.lg-btn.lg-sm { font-size: 11.5px; padding: 5px 9px; min-height: 32px; }
.lg-btn.lg-danger { border-color: var(--red); color: var(--red); }
.lg-btn[disabled] { opacity: .45; cursor: default; }
.lg-input { width: 100%; border: 1px solid var(--edge); background: var(--card); padding: 9px 10px; border-radius: 3px; font-size: 15px; }
.lg-lab { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--dim); }
.lg-sel { border: 1px dashed var(--faint); background: var(--card); border-radius: 3px; padding: 4px 6px; font-family: var(--mono); font-size: 12px; max-width: 100%; }
.lg-sel-sm { font-size: 11px; padding: 2px 4px; }
.lg-sel-need { border: 2px solid var(--warn); background: var(--warnbg); color: var(--warn); font-weight: 700; }
.lg-x { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 14px; padding: 0 4px; }
.lg-x:hover { color: var(--red); }

.lg-stamp { font-family: var(--head); font-weight: 700; font-size: 11px; letter-spacing: .14em; padding: 2px 8px; transform: rotate(-3deg); display: inline-block; white-space: nowrap; }
.lg-stamp.lg-big { font-size: 16px; padding: 4px 14px; border-width: 3px !important; align-self: flex-start; margin: 4px 0 2px 4px; }
.lg-s-ok { border: 2px solid var(--good); color: var(--good); }
.lg-s-bad { border: 2px solid var(--red); color: var(--red); }
.lg-s-draft { border: 2px dashed var(--dim); color: var(--dim); }
.lg-s-blue { border: 2px solid var(--blue); color: var(--blue); }
.lg-s-pool { border: 2px dashed var(--dim); color: var(--dim); }
.lg-s-done { border: 2px solid var(--faint); color: var(--faint); }
.lg-flag { font-family: var(--head); font-size: 11px; letter-spacing: .12em; color: var(--warn); border: 1px solid var(--warn); padding: 0 5px; margin-left: 4px; }
/* Why an army is flagged, readable on an iPad (a title tooltip is not). */
.lg-flag-why { font-family: var(--mono); font-size: 12px; color: var(--warn); margin: -4px 0 8px; line-height: 1.4; }
.lg-panic-note { flex-basis: 100%; font-size: 12px; }

/* ── The lobby ── */
.lg-lobby { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; }
.lg-armies { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-content: start; }
.lg-army { background: var(--card); border: 1px solid var(--edge); border-radius: 3px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 7px; position: relative; box-shadow: 2px 2px 0 var(--edge); cursor: default; }
.lg-army[data-pick-list] { cursor: pointer; }
.lg-army.is-picked { border: 2px solid var(--blue); box-shadow: 4px 4px 0 var(--blue); }
.lg-army > .lg-stamp { position: absolute; top: 14px; right: 14px; }
.lg-fac { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.lg-aname { font-family: var(--head); font-weight: 600; font-size: 22px; line-height: 1.1; padding-right: 80px; }
.lg-pts { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.lg-pts b { font-family: var(--head); font-size: 26px; color: var(--ink); }
.lg-issue { font-family: var(--mono); font-size: 12px; color: var(--red); }
.lg-new { border: 2px dashed var(--faint); background: transparent; box-shadow: none; align-items: center; justify-content: center; text-decoration: none; min-height: 160px; color: var(--dim); }
.lg-new b { font-family: var(--head); font-size: 19px; letter-spacing: .06em; color: var(--olive2); }
.lg-code-in { font-family: var(--mono); font-size: 30px; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.lg-game { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--rule); }
.lg-game:last-child { border-bottom: 0; }
.lg-game > span { flex: 1 1 auto; font-size: 14px; line-height: 1.3; }
.lg-game small { display: block; font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; }
.lg-code { font-family: var(--mono); font-size: 16px; width: 56px; }

/* ── The builder ── */
.lg-edtop { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.lg-edname { font-family: var(--head); font-weight: 700; font-size: 28px; letter-spacing: .04em; }
.lg-dial { margin-left: auto; font-family: var(--mono); font-size: 14px; color: var(--dim); }
.lg-dial b { font-family: var(--head); font-size: 34px; color: var(--ink); }
.lg-dial.is-bad b { color: var(--red); }
.lg-edgrid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.lg-org { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 8px; font-size: 14px; padding: 2px 0; }
.lg-org b { font-family: var(--head); font-size: 18px; }
.lg-org i { grid-column: 1 / -1; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: -3px; }
.lg-org.is-bad span, .lg-org.is-bad b { color: var(--red); }
.lg-issues { margin: 0; padding-left: 18px; color: var(--red); font-family: var(--mono); font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.lg-units-col { gap: 10px; }
.lg-ed .lg-slots { display: flex; flex-direction: column; gap: 5px; border-top: 1px dashed var(--rule); padding-top: 7px; }
.lg-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lg-slot-n { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--dim); min-width: 92px; }
.lg-pick { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12px; padding: 2px 4px 2px 8px; border: 1px solid var(--dim); background: var(--sheet); }
.lg-pick i { font-style: normal; color: var(--dim); }
.lg-card-pick { padding-left: 4px; }
.lg-cardname { background: none; border: 0; cursor: pointer; font-family: var(--head); font-size: 14px; color: var(--ink); padding: 0 2px; }
.lg-tabs { display: flex; gap: 4px; }
.lg-tab { flex: 1 1 0; font-family: var(--head); font-weight: 600; font-size: 12px; letter-spacing: .06em; padding: 5px 2px; border: 1px solid var(--edge); background: none; color: var(--dim); cursor: pointer; }
.lg-tab.on { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.lg-add { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--rule); font-size: 14px; }
.lg-add-n { flex: 1 1 auto; }
.lg-add-n small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--red); }
.lg-add b { font-family: var(--head); font-size: 16px; }
.lg-add.is-over { color: var(--faint); }

/* ── A unit ── */
.lg-unit { background: var(--card); border: 1px solid var(--edge); border-radius: 3px; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; box-shadow: 2px 2px 0 var(--edge); min-width: 0; }
.lg-unit.is-done { background: #e6dfcb; }
.lg-unit.is-ordered { border-color: var(--blue); }
.lg-unit.is-dead { opacity: .5; }
.lg-uhead { display: flex; align-items: center; gap: 8px; }
.lg-rank { font-family: var(--head); font-weight: 600; font-size: 11px; letter-spacing: .1em; padding: 1px 6px; border: 1px solid var(--olive2); color: var(--olive2); white-space: nowrap; }
.lg-uname { font-family: var(--head); font-weight: 600; font-size: 18px; flex: 1 1 auto; min-width: 0; line-height: 1.15; overflow-wrap: anywhere; }
.lg-uhead .lg-stamp { flex: 0 0 auto; }
.lg-upts { font-family: var(--head); font-weight: 700; font-size: 19px; }
.lg-figs { font-family: var(--mono); font-size: 12.5px; color: var(--ink); text-transform: uppercase; letter-spacing: .03em; }
.lg-figs b { font-family: var(--head); font-size: 18px; letter-spacing: 0; margin-right: 2px; }
.lg-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.lg-defdie { width: 14px; height: 14px; border: 1px solid var(--ink); display: inline-block; border-radius: 3px; margin-right: -8px; }
.lg-defdie-red { background: var(--red); } .lg-defdie-white { background: #fff; }
.lg-kws { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.lg-kw { font-family: var(--mono); font-size: 11.5px; padding: 1px 6px; border: 1px solid var(--olive2); background: var(--sheet); color: var(--olive); cursor: pointer; border-radius: 2px; }
.lg-kw:hover { background: var(--olive); color: var(--sheet); }
.lg-weapons { border-collapse: collapse; width: 100%; font-size: 13px; }
.lg-weapons td { padding: 3px 6px 3px 0; border-top: 1px dotted var(--rule); vertical-align: middle; }
.lg-weapons td:first-child { font-weight: 600; }
.lg-weapons small { font-weight: 400; color: var(--dim); }
.lg-dd { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--ink); margin-right: 2px; vertical-align: -1px; clip-path: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%); }
.lg-dd-red { background: var(--red); } .lg-dd-black { background: var(--ink); } .lg-dd-white { background: #fff; outline: 1px solid var(--ink); outline-offset: -1px; }
.lg-ups { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.lg-up b { font-family: var(--head); font-weight: 600; }

/* Rule text's icons */
.lg-ic { display: inline-block; font-family: var(--head); font-weight: 700; font-size: 10px; letter-spacing: .06em; padding: 0 4px; border: 1px solid var(--ink); border-radius: 2px; vertical-align: 1px; line-height: 1.4; }
.lg-ic-hit { background: var(--ink); color: var(--sheet); }
.lg-ic-crit { background: var(--red); color: #fff; border-color: var(--red); }
.lg-ic-surge, .lg-ic-dsurge { background: var(--warnbg); }
.lg-ic-block { background: var(--blue); color: #fff; border-color: var(--blue); }
.lg-ic-word { background: var(--sheet); color: var(--olive2); border-color: var(--olive2); }

/* ── The battle ── */
.lg-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--sheet); border: 1px solid var(--edge); padding: 8px 14px; border-radius: 3px; margin-bottom: 12px; }
.lg-round { font-family: var(--head); font-size: 30px; line-height: 1; }
.lg-rpips { display: flex; gap: 4px; }
.lg-rpip { width: 16px; height: 6px; background: var(--rule); }
.lg-rpip.on { background: var(--olive); }
.lg-phases { display: flex; border: 1px solid var(--olive2); border-radius: 3px; overflow: hidden; }
.lg-ph { font-family: var(--head); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 5px 11px; color: var(--olive2); }
.lg-ph.on { background: var(--olive); color: #efe9d6; }
.lg-vp { margin-left: auto; display: flex; align-items: baseline; gap: 8px; font-family: var(--head); font-weight: 700; font-size: 26px; }
.lg-vp-blue { color: var(--blue); } .lg-vp-red { color: var(--red); } .lg-vp-me { color: var(--ink); } .lg-vp-them { color: var(--dim); }
.lg-board { display: grid; grid-template-columns: 290px minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.lg-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; align-content: start; }
.lg-theirs { grid-template-columns: 1fr; }
.lg-theirs .lg-unit { padding: 8px 10px; gap: 5px; }
.lg-side-blue > span:first-child { color: var(--blue); } .lg-side-red > span:first-child { color: var(--red); }
.lg-count { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-models { display: flex; gap: 4px; }
.lg-models i { width: 12px; height: 12px; border: 2px solid var(--ink); transform: rotate(45deg); display: inline-block; }
.lg-models i.on { background: var(--ink); }
.lg-wbar { width: 120px; height: 9px; border: 1px solid var(--ink); background: var(--card); display: inline-block; }
.lg-wbar span { display: block; height: 7px; background: var(--ink); }
.lg-step { display: inline-flex; margin-left: auto; }
.lg-step button { width: 34px; height: 32px; border: 2px solid var(--ink); background: var(--sheet); font-family: var(--head); font-weight: 700; font-size: 18px; cursor: pointer; }
.lg-step button + button, .lg-step b + button { border-left: 0; }
.lg-step b { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.lg-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 22px; }
.lg-tok { display: inline-flex; align-items: center; gap: 2px; font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--dim); background: var(--sheet); padding: 0 2px; }
.lg-tok button { border: 0; background: none; cursor: pointer; font-weight: 700; padding: 1px 5px; }
.lg-tok-warn { border-color: var(--warn); color: var(--warn); background: var(--warnbg); }
.lg-tok-bad { border-color: var(--red); color: var(--red); }
.lg-uctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lg-orders { display: inline-flex; border: 1px solid var(--ink); border-radius: 3px; overflow: hidden; }
.lg-ob { font-family: var(--head); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border: 0; background: var(--sheet); padding: 6px 9px; cursor: pointer; border-left: 1px solid var(--ink); }
.lg-ob:first-child { border-left: 0; }
.lg-ob.on { background: var(--ink); color: var(--sheet); }
.lg-attack { margin-left: auto; border-color: var(--red); color: var(--red); }
.lg-more summary { font-family: var(--mono); font-size: 11.5px; color: var(--dim); cursor: pointer; text-transform: uppercase; }
.lg-more[open] { display: flex; flex-direction: column; gap: 6px; }
.lg-bc summary { cursor: pointer; display: flex; flex-direction: column; }
.lg-bc summary b { font-family: var(--head); font-weight: 600; font-size: 16px; }
.lg-bc-t { font-size: 13px; padding: 4px 0 2px; }
.lg-hand { display: grid; grid-template-columns: 1fr; gap: 6px; }
.lg-cc { text-align: left; background: var(--card); border: 1px solid var(--edge); border-left: 4px solid var(--blue); border-radius: 3px; padding: 6px 9px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; position: relative; }
.lg-cc.is-pick { border: 2px solid var(--blue); border-left-width: 6px; box-shadow: 3px 3px 0 var(--blue); }
.lg-cc.is-used { opacity: .5; cursor: default; }
.lg-cc .lg-stamp { position: absolute; right: 8px; top: 8px; }
.lg-pips { font-family: var(--head); font-weight: 700; font-size: 18px; color: var(--blue); line-height: 1; letter-spacing: .08em; }
.lg-cc b { font-family: var(--head); font-weight: 600; font-size: 15px; }
.lg-cc i { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.lg-cc-fx { font-size: 12.5px; }
.lg-reveal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lg-pool { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.lg-pt { border: 2px solid var(--olive2); border-radius: 50%; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--head); }
.lg-pt i { font-style: normal; font-size: 17px; font-weight: 700; line-height: 1; }
.lg-pt span { font-size: 8.5px; letter-spacing: .06em; color: var(--olive2); }
.lg-pt.is-zero { opacity: .35; }
.lg-log { display: flex; flex-direction: column; gap: 0; max-height: 320px; overflow: auto; }
.lg-entry { font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--rule); }
.lg-who-blue { color: var(--blue); } .lg-who-red { color: var(--red); } .lg-who-them { color: var(--dim); }
.lg-result { background: var(--sheet); border: 1px solid var(--edge); padding: 24px; border-radius: 3px; display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 20px auto; }
.lg-rt { border-collapse: collapse; width: 100%; }
.lg-rt th, .lg-rt td { text-align: left; padding: 6px 8px; border-bottom: 1px dashed var(--rule); }
.lg-rt th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--dim); }

/* ── The dice tray ── */
.lg-tray { position: fixed; inset: 56px 0 0 0; background: rgba(34, 35, 29, .45); z-index: 30; display: flex; justify-content: center; align-items: flex-start; padding: 18px; }
.lg-tray-in { background: var(--sheet); border: 1px solid var(--edge); border-radius: 3px; box-shadow: 0 10px 40px rgba(0,0,0,.25); width: min(980px, 100%); max-height: calc(100vh - 92px); overflow: auto; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.lg-step-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--edge); padding-top: 9px; }
.lg-step-h b { font-family: var(--head); font-weight: 600; font-size: 15px; letter-spacing: .06em; }
.lg-wt td { padding: 4px 8px 4px 0; }
.lg-wt tr.is-off td:not(:first-child) { opacity: .5; }   /* the weapon fades; its − and + stay at full strength */
.lg-warn { margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--warn); background: var(--warnbg); border: 1px solid var(--warn); border-radius: 3px; padding: 6px 10px; }
.lg-dice { display: flex; flex-wrap: wrap; gap: 9px; }
.lg-die { width: 66px; height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid var(--ink); cursor: pointer; padding: 0; position: relative; }
.lg-die b { font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: .06em; }
.lg-die s { text-decoration: none; font-family: var(--mono); font-size: 9px; opacity: .75; }
.lg-d8 { clip-path: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%); border: 0; box-shadow: inset 0 0 0 2px var(--ink); }
.lg-d6 { border-radius: 10px; }
.lg-c-red { background: var(--red); color: #f7f2e4; }
.lg-c-black { background: var(--ink); color: var(--sheet); box-shadow: inset 0 0 0 2px #000; }
.lg-c-white { background: #fbf8f0; color: var(--ink); }
.lg-die.is-blank b { opacity: .45; }
.lg-die.is-x { opacity: .3; }
.lg-die.is-x::after { content: ''; position: absolute; left: 10%; right: 10%; top: 50%; border-top: 3px solid var(--red); transform: rotate(-30deg); }
.lg-die.is-pk { outline: 4px solid var(--blue); outline-offset: 2px; }
.lg-d8.is-pk { box-shadow: inset 0 0 0 5px var(--blue); outline: 0; }
.lg-die[disabled] { cursor: default; }
.lg-dice-sm .lg-die { width: 46px; height: 46px; }
.lg-dice-sm .lg-die b { font-size: 11px; }
.lg-tally { display: flex; gap: 16px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; color: var(--dim); }
.lg-tally b { font-family: var(--head); font-size: 22px; color: var(--ink); }
.lg-seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; }
.lg-seg button { font-family: var(--head); font-weight: 600; font-size: 12px; letter-spacing: .06em; padding: 5px 11px; border: 0; border-left: 1px solid var(--ink); background: var(--sheet); cursor: pointer; }
.lg-seg button:first-child { border-left: 0; }
.lg-seg .on { background: var(--ink); color: var(--sheet); }
.lg-result-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--card); border: 2px solid var(--ink); border-radius: 3px; padding: 10px 14px; }
.lg-big { font-family: var(--head); font-weight: 700; font-size: 26px; }
.lg-ct { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; }
.lg-ct span { font-family: var(--head); font-weight: 600; font-size: 12px; padding: 4px 8px; background: var(--sheet); color: var(--ink); min-width: 92px; text-align: center; }
.lg-ct button { border: 0; padding: 4px 10px; font-weight: 700; cursor: pointer; background: inherit; color: inherit; }
.lg-ct-def { border-radius: 9px; }
.lg-wrap { flex-wrap: wrap; }
.lg-dots { display: inline-flex; flex-wrap: wrap; gap: 1px; max-width: 360px; }

/* ── The rules lookup ── */
.lg-modal { position: fixed; inset: 0; background: rgba(34, 35, 29, .45); z-index: 50; display: flex; justify-content: center; align-items: flex-start; padding: 60px 16px 16px; }
.lg-modal-in { background: var(--sheet); border: 1px solid var(--edge); border-radius: 3px; width: min(720px, 100%); max-height: calc(100vh - 80px); display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.lg-rules-body { overflow: auto; font-size: 15px; line-height: 1.5; }
.lg-rules-body p { margin: 0 0 8px; }
.lg-hit { display: flex; flex-direction: column; gap: 1px; text-align: left; width: 100%; background: none; border: 0; border-bottom: 1px dashed var(--rule); padding: 8px 2px; cursor: pointer; }
.lg-hit:hover { background: var(--card); }
.lg-hit b { font-family: var(--head); font-weight: 600; font-size: 16px; }
.lg-snip { font-size: 13px; color: var(--dim); }
.lg-toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--sheet); padding: 9px 16px; border-radius: 3px; font-family: var(--mono); font-size: 13px; z-index: 60; }

/* ── The phase guide and the map ── */
.lg-guide summary b { font-size: 14px; }
.lg-guide .lg-bc-t { max-height: 320px; overflow: auto; }
.lg-map { width: 100%; max-width: 260px; display: block; margin: 6px auto 4px; border-radius: 3px; }
.lg-h a { font-family: var(--mono); font-size: 11px; text-transform: none; letter-spacing: .03em; }
.lg-rng { white-space: nowrap; font-family: var(--mono); font-size: 12px; }

/* ── The quickstart (guide.php), after BB7s's guest guide ── */
.gd-main { max-width: 980px; display: flex; flex-direction: column; gap: 12px; }
.gd-intro { display: flex; flex-direction: column; gap: 6px; padding: 6px 2px 10px; }
.gd-intro p { margin: 0; font-size: 16px; max-width: 70ch; }
.gd-sec { background: var(--sheet); border: 1px solid var(--edge); border-radius: 3px; box-shadow: 0 1px 0 var(--edge); }
.gd-sec > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-family: var(--head); font-weight: 600; font-size: 19px; letter-spacing: .05em; }
.gd-sec > summary::-webkit-details-marker { display: none; }
.gd-sec > summary::after { content: '+'; margin-left: auto; font-size: 22px; color: var(--olive2); }
.gd-sec[open] > summary::after { content: '–'; }
.gd-n { font-family: var(--mono); font-size: 13px; color: var(--sheet); background: var(--olive); padding: 2px 7px; border-radius: 2px; }
.gd-body { padding: 4px 18px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.5; }
.gd-body p { margin: 0; max-width: 75ch; }
.gd-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.gd-step { background: var(--card); border: 1px solid var(--edge); border-left: 4px solid var(--olive); border-radius: 3px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.gd-step-n { position: absolute; top: 8px; right: 10px; font-family: var(--head); font-size: 22px; color: var(--edge); }
.gd-step > b { font-family: var(--head); font-weight: 600; font-size: 16px; letter-spacing: .03em; padding-right: 26px; }
.gd-step p { font-size: 14px; }
.gd-table { border-collapse: collapse; width: 100%; max-width: 760px; }
.gd-table th, .gd-table td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px dashed var(--rule); vertical-align: top; }
.gd-table th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--dim); }
.gd-table td:first-child { font-family: var(--head); font-weight: 600; white-space: nowrap; }
.gd-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gd-map { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.gd-map img { width: 100%; border-radius: 3px; }
.gd-map figcaption { font-family: var(--head); font-weight: 600; font-size: 15px; }
.gd-phase { display: flex; flex-direction: column; gap: 2px; }
.gd-phase > b { font-family: var(--head); font-weight: 600; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--olive2); }
.gd-phase ol, .gd-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 5px; }
.gd-refs { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; border-top: 1px dashed var(--rule); padding-top: 8px; }
.gd-refs .lg-mono { margin-right: 4px; }

/* ── Narrower screens ── */
@media (max-width: 1180px) {
  .lg-board { grid-template-columns: 270px minmax(0, 1fr); }
  .lg-board .lg-right { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .lg-board .lg-right > .lg-h { grid-column: 1 / -1; }
  .lg-edgrid { grid-template-columns: 230px minmax(0, 1fr); }
  .lg-edgrid > .lg-col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 820px) {
  .lg-lobby, .lg-board, .lg-edgrid, .lg-board .lg-right, .lg-edgrid > .lg-col:last-child { grid-template-columns: 1fr; }
  .lg-top { gap: 10px; padding: 0 12px; }
  .lg-who .lg-mono { display: none; }
}
