/* The lobby: your name and the games on the left, the six bloc cards on the felt in the middle,
   the game's settings, who is playing and the one big button on the right. Then the opening that
   plays when a game starts. Everything here starts with "lb-" so it cannot disturb another screen.
   Colours, fonts and the look of cards and buttons come from tabletop.css and app.css. */

.lb{position:absolute;left:12px;top:72px;right:12px;bottom:12px;display:grid;grid-template-columns:300px minmax(0,1fr) 340px;gap:16px}
.lb-defs{position:absolute}
.lb-left,.lb-right{display:flex;flex-direction:column;gap:12px;min-height:0;min-width:0}
.lb .card>h3{padding-bottom:8px;border-bottom:1.5px solid var(--ink)}
.lb .card>h3 i{margin-left:auto}

/* ---------- left: your name, and the games */
.lb-name{padding:13px 14px 11px}
.lb-name .input{margin:10px 0 6px}
.lb-games{padding:13px 14px;display:flex;flex-direction:column;gap:9px;flex:1;min-height:0}
.lb-games h4{font:600 10.5px/1 var(--cond);letter-spacing:.14em;color:var(--ink2);margin-top:6px}
.lb-gamelist{display:flex;flex-direction:column;gap:9px;overflow:auto;flex:1;min-height:0;margin:0 -4px;padding:0 4px 3px}
.lb-games .game{flex:none}
.lb-games .game.new{margin-top:0}
.lb-games .game.saved{padding-bottom:10px}
.lb-back{align-self:flex-start;margin-top:6px;font-size:12px;padding:6px 9px 5px}

/* ---------- middle: the felt, with the six bloc cards */
.lb-felt{border-radius:8px;background:#2F4A3C var(--grain);box-shadow:inset 0 4px 10px rgba(0,0,0,.65),inset 0 0 0 1px rgba(0,0,0,.5),0 0 0 5px #3d2614,0 0 0 6px #1d120a;padding:14px 16px 10px;display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0}
.lb-pick{display:flex;flex-direction:column;gap:11px;flex:1;min-height:0}
.lb-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;flex:1;min-height:0}
.lb-card{border-radius:6px;background:var(--card) var(--grain);box-shadow:0 0 0 1px rgba(30,20,10,.6),0 2px 0 #bdaa84,0 3px 0 rgba(30,20,10,.6),0 7px 9px rgba(0,0,0,.4);border-top:10px solid var(--b);padding:9px 12px 11px;display:flex;flex-direction:column;gap:7px;min-height:0;min-width:0;overflow:hidden;transition:transform .12s}
.lb-card.can{cursor:pointer}
.lb-card.can:hover{transform:translateY(-2px)}
.lb-card.on{box-shadow:0 0 0 3px var(--ink),0 4px 0 2px #bdaa84,0 5px 0 3px rgba(30,20,10,.7),0 14px 14px rgba(0,0,0,.5);background-color:var(--bl)}
.lb-card-h{display:flex;align-items:center;gap:9px;height:24px;flex:none}
.lb-card-h b{font:700 17px/1 var(--slab);letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* The map fills whatever height the card has left, so there is no empty paper under the words. */
.lb-mapbox{flex:1;min-height:0;border:1.3px solid var(--ink);border-radius:4px;overflow:hidden;background:#BDD4D3;display:flex}
.lb-map{display:block;width:100%;height:100%}
.lb-blurb{display:grid;grid-template-columns:58px minmax(0,1fr);font:13px/17px var(--text);color:var(--ink);flex:none;min-height:34px}
.lb-blurb b{font:600 11px/17px var(--cond);letter-spacing:.08em;text-transform:uppercase;color:var(--ink2)}
.lb-blurb.short{margin-top:-2px}
.lb-play{width:100%;height:40px;font-size:14px;letter-spacing:.08em;flex:none}
.lb-card .lb-play{color:#F6EFDD}
.lb-play.picked{background:var(--b);color:var(--ink);border-color:var(--ink);box-shadow:0 2px 0 var(--ink)}
.lb-play.picked:hover{background:var(--b)}
.lb-who{height:40px;flex:none;display:flex;align-items:center;gap:9px;border:1.3px solid var(--line);border-radius:4px;padding:0 9px;background:rgba(255,255,255,.4);min-width:0}
.lb-who span{min-width:0;display:flex;flex-direction:column;gap:3px}
.lb-who b{font:700 14px/1 var(--slab);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-who i{font:italic 11.5px/1 var(--text);color:var(--ink2);white-space:nowrap}
.lb-who.you{border:1.6px solid var(--ink);background:rgba(255,255,255,.55)}
.lb-av{flex:none;display:block}
.lb-av-t{font:700 21px/1 var(--slab)}

/* The quiet line under the cards. Short messages appear over this strip, not over a heading. */
.lb-word{height:34px;flex:none;display:flex;align-items:center;justify-content:center;font:italic 13px/1.2 var(--text);color:#cfdccb;text-align:center}
.lb-word b{font-style:normal;color:#efe5cb;margin:0 4px}
.lb-word .lb-invite{width:30em;max-width:60%;margin-left:8px;font-style:normal}
#stage:has(#lobby) ~ #toast{left:calc(50% - 20px);top:auto;bottom:16px;max-width:560px;min-height:34px;display:flex;align-items:center;text-align:center;z-index:11}
#stage:has(#lobby) ~ #toast[hidden]{display:none}

/* ---------- right: the game, who is playing, the big button */
.lb-setup{padding:13px 14px 12px;flex:none}
.lb-field{margin-top:11px}
.lb-label{display:block;font:600 11.5px/1 var(--cond);letter-spacing:.1em;text-transform:uppercase;color:var(--ink2);margin-bottom:6px}
.lb-label i{text-transform:none;letter-spacing:.02em;font-style:italic}
.lb-field .fine{margin-top:6px}
.lb-field .input{margin:0}
.lb-segs{display:grid;grid-template-columns:repeat(6,1fr);border:1.6px solid var(--ink);border-radius:4px;overflow:hidden;background:#fffaf0}
.lb-seg{appearance:none;border:0;border-left:1.2px solid var(--line);background:none;height:36px;font:700 17px/1 var(--slab);color:var(--ink);padding:0}
.lb-seg:first-child{border-left:0}
.lb-seg:hover{background:var(--youlight)}
.lb-seg.on{background:var(--ink);color:#F6EFDD;border-left-color:var(--ink)}
.lb-seg:focus-visible,.lb-dd-btn:focus-visible,.lb-play:focus-visible,.lb-go:focus-visible,.lb .btn:focus-visible,.lb .game:focus-visible{outline:3px solid var(--you);outline-offset:-3px}
.lb-seg.on:focus-visible{outline-color:var(--you)}

/* the list that opens for the length of the game */
.lb-dd{position:relative}
.lb-dd-btn{appearance:none;width:100%;height:38px;border:1.6px solid var(--ink);border-radius:4px;background:#fffaf0;box-shadow:inset 0 2px 3px rgba(0,0,0,.1);display:flex;align-items:baseline;gap:9px;padding:0 12px;text-align:left;line-height:36px}
.lb-dd-btn b,.lb-dd-list b{font:700 15px/36px var(--slab)}
.lb-dd-btn i,.lb-dd-list i{font:italic 12.5px/36px var(--text);color:var(--ink2)}
.lb-dd-arrow{margin-left:auto;align-self:center;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:8px solid var(--ink)}
.lb-dd.open .lb-dd-arrow{transform:rotate(180deg)}
.lb-dd-list{position:absolute;z-index:5;left:0;right:0;top:41px;margin:0;padding:4px;list-style:none;background:#fffaf0;border:1.6px solid var(--ink);border-radius:4px;box-shadow:0 10px 18px rgba(0,0,0,.45)}
.lb-dd-list li{display:flex;align-items:baseline;gap:9px;padding:0 9px;height:34px;border-radius:3px;cursor:pointer}
.lb-dd-list li b,.lb-dd-list li i{line-height:34px}
.lb-dd-list li.active{background:var(--youlight);box-shadow:inset 0 0 0 1.5px var(--ink)}
.lb-dd-list li[aria-selected="true"]:after{content:"";margin-left:auto;align-self:center;width:11px;height:6px;border-left:2.4px solid var(--ink);border-bottom:2.4px solid var(--ink);transform:translateY(-2px) rotate(-45deg)}

.lb-facts{display:grid;grid-template-columns:repeat(4,1fr);padding:10px 0 0}
.lb-facts span{text-align:center;font:600 10.5px/1.2 var(--cond);letter-spacing:.08em;text-transform:uppercase;color:var(--ink2)}
.lb-facts span+span{border-left:1.2px solid var(--line)}
.lb-facts b{display:block;font:700 17px/1.2 var(--slab);color:var(--ink);letter-spacing:.02em;text-transform:none}

.lb-players{padding:13px 14px 4px;flex:1;min-height:0;display:flex;flex-direction:column}
.lb-row{display:flex;align-items:center;gap:10px;flex:1;min-height:38px;max-height:54px;padding:0 6px;margin:0 -6px;border-bottom:1.2px solid var(--line)}
.lb-row:last-child{border-bottom:0}
.lb-row span{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.lb-row b{font:700 15px/1 var(--slab);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-row i{font:italic 11.5px/1 var(--text);color:var(--ink2);white-space:nowrap}
.lb-row i{overflow:hidden;text-overflow:ellipsis}
.lb-row.me{background:var(--youlight);box-shadow:inset 0 0 0 1.5px var(--ink);border-radius:4px;border-bottom-color:transparent}
.lb-row.cpu b{font-weight:600;color:var(--ink2)}
.lb-row.maybe .lb-av{opacity:.55}

.lb-extra{display:flex;flex-wrap:wrap;gap:10px;flex:none}
.lb-extra .btn{flex:1;height:38px;font-size:13px}
.lb-extra .btn.wide{flex:none;width:100%}
.lb-go{flex:none;height:86px;width:100%}
.lb-go i{max-width:300px;white-space:normal;text-align:center}
.lb-go.off{background:#4a4038;color:#d8cbae;cursor:default;box-shadow:inset 0 0 0 2px #4a4038,inset 0 0 0 3.5px #8B8371,0 4px 0 #0e0a07,0 12px 14px rgba(0,0,0,.5);font-size:15px;letter-spacing:.07em}
.lb-go.off:hover{transform:none}
.lb-go.needs{color:#d8cbae}
.lb-go.needs i{color:var(--you);font-size:12.5px}

/* a short shake that says "this is what is still missing" */
@keyframes lb-nudge{0%,100%{transform:translateX(0)}20%{transform:translateX(-7px)}45%{transform:translateX(6px)}70%{transform:translateX(-4px)}}
.lb-nudge{animation:lb-nudge .45s}
.lb-nudge.card,.lb-pick.lb-nudge .lb-card.can{box-shadow:0 0 0 3px var(--you),0 9px 16px rgba(0,0,0,.45)}

/* the "are you sure" card */
.modal-card .pop-f .btn{height:38px;min-width:110px}

/* ---------- the opening, when a game starts */
@keyframes lb-open-in{from{opacity:0}to{opacity:1}}
@keyframes lb-unfold{0%{transform:perspective(1600px) rotateX(-74deg) scaleX(.82);opacity:0}35%{opacity:1}100%{transform:perspective(1600px) rotateX(0) scaleX(1);opacity:1}}
@keyframes lb-wash{0%{opacity:0;transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}
@keyframes lb-tag{0%{opacity:0}100%{opacity:1}}
.lb-opening{position:absolute;inset:0;z-index:20;background:rgba(24,15,8,.93);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;cursor:pointer;animation:lb-open-in .22s both;transition:opacity .2s}
.lb-opening.out{opacity:0}
.lb-open-h{display:flex;align-items:baseline;gap:16px;color:#f1e6cc;height:30px}
.lb-open-h b{font:700 26px/1 var(--slab);letter-spacing:.16em}
.lb-open-h i{font:italic 16px/1 var(--text);color:#cdbb9c}
.lb-open-board{width:1340px;height:670px;border-radius:8px;overflow:hidden;background:#BDD4D3;box-shadow:0 0 0 6px #3d2614,0 0 0 7.5px #1d120a,0 24px 50px rgba(0,0,0,.7);transform-origin:50% 0;animation:lb-unfold .52s cubic-bezier(.2,.8,.3,1) both}
.lb-open-board svg{display:block;width:100%;height:100%}
.lb-wash{opacity:0;transform-box:fill-box;transform-origin:center;animation:lb-wash .42s ease-out both}
.lb-tag{opacity:0;animation:lb-tag .3s ease-out both;text-anchor:middle;paint-order:stroke;stroke:#F6EFDD;stroke-linejoin:round}
.lb-tag-n{font:700 36px/1 var(--slab);fill:var(--ink);stroke-width:9px}
.lb-tag-b{font:600 20px/1 var(--cond);letter-spacing:.1em;fill:var(--ink);stroke-width:6px}
.lb-open-skip{font:italic 13.5px/1 var(--text);color:#cdbb9c;height:16px}
/* "Blocs nobody picks": two choices in the same segmented style as the people row. */
.lb-unpicked h4{margin:0 0 6px;font:600 10.5px/1.2 var(--cond);letter-spacing:.1em;text-transform:uppercase;color:var(--ink2)}
.lb-unpicked [role=radiogroup]{display:grid;grid-template-columns:1fr 1fr;border:1.6px solid var(--ink);border-radius:4px;overflow:hidden;background:#fffaf0}
.lb-unpicked .lb-seg{font:700 12.5px/1.15 var(--slab);padding:0 6px;white-space:normal;height:40px}
.lb-unpicked .lb-seg+.lb-seg{border-left:1.6px solid var(--ink)}

/* ---------- the sweep for text that runs over (2026-11) */
/* A long game name wraps instead of running off the card (headings do not wrap by default). */
.lb-setup>h3,.lb-pick>h3{white-space:normal;line-height:1.2;overflow-wrap:anywhere;flex-wrap:wrap;row-gap:3px}
/* "YOU ARE IN" sits in the game's top right corner: the title keeps clear of it. */
.lb-games .game:has(>em)>b,.lb-games .game:has(>u)>b{padding-right:78px}
/* With the "blocs nobody picks" and "how hard" rows the setup card is taller, so it is set a little
   tighter and the six players' rows are allowed to be lower, so the last one is not pushed under the button. */
.lb-setup .lb-field{margin-top:8px}
.lb-setup .lb-field .fine{margin-top:4px;line-height:1.25}
.lb-setup .lb-seg{height:32px}
.lb-setup .lb-unpicked .lb-seg{height:36px}
.lb-setup .lb-dd-btn{height:34px;line-height:32px}
.lb-setup .lb-dd-btn b,.lb-setup .lb-dd-btn i{line-height:32px}
.lb-setup .lb-dd-list{top:37px}
.lb-row{min-height:31px}
.lb-players{overflow:hidden auto}

/* What a bloc starts with, as icons (client/app/blocstats.js), in place of the Good / Short of sentences. */
.lb-stats{flex:none;display:grid;gap:2px}
.lb-stat{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;min-height:19px}
.lb-stat>b{font:600 11px/1.3 var(--cond);letter-spacing:.08em;text-transform:uppercase;color:var(--ink2)}
.lb-stat>span{display:flex;align-items:center;gap:4px 9px;flex-wrap:wrap;min-width:0}
.lb-stat svg{flex:none;display:block}
.lb-sc{display:inline-flex;align-items:center;gap:4px}
.lb-sc em{font:700 12.5px/1.3 var(--slab);font-style:normal;color:var(--ink)}
.lb-pips{display:inline-flex;gap:2px}
.lb-pips i{width:7px;height:7px;border-radius:50%;border:1.3px solid var(--ink);box-sizing:border-box}
.lb-pips i.on{background:var(--ink)}
.lb-pcs,.lb-res{display:inline-flex;align-items:center}
.lb-pcs svg+svg{margin-left:1px}
.lb-res{min-width:17px}
.lb-res svg+svg{margin-left:-2px}
.lb-none{font:italic 12px/1.3 var(--text);color:var(--ink2)}
.lb-tag{display:inline-flex;align-items:center;gap:2px;font:700 11px/1.3 var(--cond);letter-spacing:.04em;padding:1px 5px;border:1.3px solid var(--ink);border-radius:3px;background:#fffaf0}
.lb-find{display:inline-flex;gap:2px}
.lb-find i{width:14px;height:14px;border:1.3px dashed var(--ink);border-radius:3px;box-sizing:border-box;font:700 10px/11.5px var(--slab);font-style:normal;text-align:center;color:var(--ink2)}
.lb-stat>span{flex-wrap:nowrap;gap:7px}
.lb-none{white-space:nowrap}

/* "How long?" and "Time for each round?" share one row of the setup card, so the card is no taller for the clock. */
.lb-two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:10px;align-items:end}
.lb-two .lb-dd-btn{padding:0 9px;gap:6px}
.lb-two .lb-dd-btn i{display:none}
.lb-two .lb-dd-list{right:auto;width:272px}
.lb-clock{grid-template-columns:repeat(4,1fr);height:34px;box-sizing:border-box}
.lb-setup .lb-clock .lb-seg{height:100%;font:700 15px/1 var(--slab);display:flex;align-items:center;justify-content:center;gap:2px;padding:0}
.lb-clock .lb-seg i{margin-top:3px;font:600 9.5px/1 var(--cond);letter-spacing:.04em;font-style:normal;opacity:.75}
/* The name box comes with a funny name already in it (client/app/gamenames.js); the round arrow gives another. */
.lb-title{display:flex;gap:6px;align-items:stretch}
.lb-title .input{flex:1 1 auto;min-width:0}
.lb-reroll{flex:0 0 auto;width:34px;border:1.6px solid var(--ink);border-radius:4px;background:#fffaf0;color:var(--ink);font:700 17px/1 var(--slab);cursor:pointer}
.lb-reroll:hover{background:#f3e7cc}
.lb-reroll:focus-visible{outline:3px solid var(--you);outline-offset:1px}

/* ---------- "3 · The game" in signs and short words (2026-11). No control's words can wrap out of
   its box or over a neighbour: every button keeps its words on one line, inside it. What a choice
   means is its explanation on hover or a tap (data-tip). */
.lb-setup .lb-label{display:flex;align-items:center;gap:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}
.lb-setup .lb-label svg{flex:none;display:block}
.lb-setup .lb-seg{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-unpicked .lb-label{margin-bottom:6px}
.lb-setup .lb-unpicked .lb-seg{display:flex;align-items:center;justify-content:center;gap:6px;font:700 14px/1 var(--slab);height:32px;padding:0 6px}
.lb-unpicked .lb-seg svg{flex:none;display:block}
.lb-unpicked .lb-seg span{min-width:0;overflow:hidden;text-overflow:ellipsis}
/* the length: "16 rounds" (or "~16 rounds" under a hidden ending), never more than one line */
.lb-dd-btn{overflow:hidden;white-space:nowrap}
.lb-dd-btn b{flex:none;white-space:nowrap}
.lb-two .lb-dd-btn i{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-dd-arrow{flex:none}
.lb-dd-list li{white-space:nowrap}
.lb-dd-list li i{overflow:hidden;text-overflow:ellipsis;min-width:0}
.lb-two>div{min-width:0}
/* the clock's "min" stays beside its number */
.lb-clock .lb-seg i{flex:none}
/* the list of games: a long name wraps inside its box; the new-game box is one line */
.lb-games .game b,.lb-games .game span{overflow-wrap:anywhere;min-width:0}
.lb-games .game.new{text-align:left}
.lb-games .game.new b{margin-bottom:0}
/* the words under a face on a bloc card stay on their one line, inside the card */
.lb-who i{overflow:hidden;text-overflow:ellipsis;max-width:100%}
.lb-setup .lb-dd-btn,.lb-setup .lb-dd-btn b,.lb-setup .lb-dd-btn i{line-height:30px}

/* ---------- the bloc card's button and figures (2026-11, tools/playtest/overflow.py) */
/* The chosen card's button says only "✓ Your pick" (the bloc's name is the card's heading; the button's aria-label
   names it), so it is the same length for every bloc. Any button's words may take a second line, evenly split,
   rather than run past its edge: one line looks as before. */
.lb-play{white-space:normal;text-wrap:balance;line-height:1.1;padding-block:0;display:flex;align-items:center;justify-content:center;gap:6px;text-align:center}
.lb-play svg{flex:none;display:block}
/* The card's heading: a little smaller when the card is narrow (an upright iPad, a phone), so "Northern Eurasia" fits. */
.lb-card{container-type:inline-size}
.lb-card-h b{font-size:min(17px,8.4cqi)}
html.touch .lb-card .lb-card-h b{font-size:min(15.5px,8.4cqi)}
/* MONEY and PEOPLE: the sign sits centred in a column of its own, so the dots and the figures start at the same
   place on both rows, and the sign, the dots and the figure share one centre line. */
.lb-sc{align-items:center}
.lb-ic{flex:none;width:16px;height:17px;display:flex;align-items:center;justify-content:center}
.lb-ic svg{display:block}
.lb-sc em{line-height:1;position:relative;top:.25em}
/* TO FIND: the "?" (a drawn sign) centred in its dashed box both ways. */
.lb-find i{display:flex;align-items:center;justify-content:center;line-height:0}
.lb-find i svg{display:block;flex:none;position:relative;left:-.7px}
/* FORCES: no fleet is a faint fleet (blocstats.js), so six armies and it fit the narrowest card. */
.lb-nofleet>svg{opacity:.3;filter:grayscale(1)}
