/* CONQUEROR game screen (public/conquer.js draws into #gameHost.cq-host). Shell pieces WATAN uses are hidden by
   the .kind-conquer rules in style.css; this file lays out the map, the action bar and the overlays. */

.cq-host { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 8px 0 0; }
.kind-conquer .board-wrap { min-height: calc(100dvh - 70px); display: flex; flex-direction: column; }
.cq-strip { display: none; }
.cq-stage { position: relative; flex: 1 1 auto; min-height: 0; border-radius: 14px; overflow: hidden; background: #050c17;
  box-shadow: inset 0 0 0 1px rgba(127,180,230,.10), inset 0 0 80px rgba(0,0,0,.55); }
.cq-map { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

/* ---------- the map ---------- */
.cq-t { cursor: pointer; outline: none; transition: opacity .25s; }
.cq-fill { stroke-width: .9; stroke-linejoin: round; transition: fill .45s, stroke .45s; }
/* continent outlines (no hues): a dark casing under a light line, both clearly heavier than territory borders
   (1.25); the land edges where two continents meet are the heaviest */
.cq-coast path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cq-coast .cq-case { stroke: #02050a; stroke-width: 3.2; stroke-opacity: .9; }
.cq-coast .cq-case.cq-cb { stroke-width: 4.8; stroke-opacity: .95; }
.cq-coast .cq-cl { stroke: rgba(226,234,245,.75); stroke-width: 1.4; }
.cq-coast .cq-cl.cq-cb { stroke: #f4f7fb; stroke-opacity: 1; stroke-width: 2.1; }
.cq-cnames text { display: none; font: 400 6.6px var(--title); letter-spacing: .14em; fill: rgba(196,212,232,.58); text-anchor: middle; }
.cq-map.cnames .cq-cnames text { display: block; }
.cq-dimov { fill: rgba(3,7,14,.5); }
.cq-t.neutral .cq-tex { opacity: .5; }
.cq-t:focus-visible .cq-fill { stroke: #fff; stroke-width: 2.4; }
.cq-borders { fill: none; stroke: #060a12; stroke-width: 1.25; stroke-linecap: round; opacity: .92; }
.cq-lane { fill: none; stroke: #d7e9fb; stroke-opacity: .55; stroke-width: 1.15; stroke-dasharray: 2.6 3.2; stroke-linecap: round; }
.cq-lane.wrap { stroke: #f2c26b; stroke-opacity: .8; }
.cq-lane-arrow { fill: none; stroke: #f2c26b; stroke-opacity: .85; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cq-hl { fill: none; stroke-linecap: round; }
.cq-hl.sel { stroke: #fff; stroke-width: 2.6; filter: drop-shadow(0 0 2.5px rgba(255,255,255,.9)); }
.cq-hl.tgt { stroke: #ff5d62; stroke-width: 2; stroke-dasharray: 3.5 2.2; animation: cqMarch 1s linear infinite; }
.cq-hl.tgt.own { stroke: #3ee6a8; }
.cq-hl.tgt.on { stroke-width: 3; stroke-dasharray: none; filter: drop-shadow(0 0 3px currentColor); }
.cq-hl.staged { stroke: #5ff0ff; stroke-width: 1.6; stroke-dasharray: 2.4 1.6; opacity: .95; }
.cq-arrow { fill: none; stroke: #fff; stroke-width: 1.6; stroke-dasharray: 3 2.4; stroke-linecap: round; opacity: .9; animation: cqMarch .8s linear infinite; }
@keyframes cqMarch { to { stroke-dashoffset: -11.4; } }

.cq-b { cursor: pointer; transition: opacity .25s; }
.cq-b-ring { fill: #0a0f18; stroke-width: 1.7; filter: drop-shadow(0 .8px 1px rgba(0,0,0,.7)); }
.cq-b-n { font: 700 7.4px var(--ui); fill: #fff; text-anchor: middle; font-variant-numeric: tabular-nums; pointer-events: none; }
.cq-b-n.big { font-size: 5.8px; }
.cq-b.sel .cq-b-ring { stroke: #fff; stroke-width: 2.2; }
.cq-b.staged .cq-b-ring { stroke: #5ff0ff; stroke-width: 2.2; fill: #062227; }
.cq-b.dim { opacity: .78; }
.cq-b.hid .cq-b-n { fill: #9aa4b5; }
.cq-b-plus rect { fill: #5ff0ff; }
.cq-b-plus text { font: 800 5.2px var(--ui); fill: #021316; text-anchor: middle; }
.cq-b-plus.hidden { display: none; }
.cq-b-name { display: none; font: 600 4.6px var(--ui); fill: #eef3fa; text-anchor: middle; paint-order: stroke; stroke: rgba(4,8,15,.88); stroke-width: 1.5; stroke-linejoin: round; letter-spacing: .02em; pointer-events: none; }
.cq-map.names .cq-b-name { display: block; }
.cq-float { font: 800 8.5px var(--ui); fill: #ff6b6b; text-anchor: middle; paint-order: stroke; stroke: #05080e; stroke-width: 2.2; stroke-linejoin: round; animation: cqFloat 1.25s ease-out forwards; }
.cq-float.d { fill: #ffd166; }
@keyframes cqFloat { 0% { transform: translateY(2px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-13px); opacity: 0; } }
.cq-flash { opacity: 0; stroke-width: 2.4; animation: cqFlash 1.25s ease-out; pointer-events: none; }
@keyframes cqFlash { 0% { opacity: .95; } 35% { opacity: .75; } 100% { opacity: 0; } }

/* zoom buttons, legend, hover card */
.cq-zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(8,13,22,.78); border: 1px solid rgba(127,180,230,.16); backdrop-filter: blur(4px); z-index: 3; }
.cq-zoom button { width: 32px; height: 32px; min-height: 32px; padding: 0; display: grid; place-items: center; font: 600 18px var(--ui); line-height: 1; border-radius: 7px; background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.cq-zoom button.on { background: rgba(242,193,78,.1); color: #f2c14e; border-color: rgba(242,193,78,.6); }
.cq-legend { display: none; }
.cq-tip { position: absolute; z-index: 4; pointer-events: none; display: grid; gap: 2px; padding: 7px 10px; border-radius: 9px; background: rgba(8,12,20,.94); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 10px 28px rgba(0,0,0,.55); font-size: 12px; white-space: nowrap; }
.cq-tip b { font-size: 13.5px; letter-spacing: .02em; }
.cq-tip-c, .cq-tip-o { display: flex; align-items: center; gap: 6px; color: #b8c2d2; }
.cq-tip-c::before { content: "◇"; font-size: 10px; color: #8f9ab0; }
.cq-tip-o::before { content: ""; width: 9px; height: 9px; }
.cq-tip-o::before { border-radius: 50%; background: var(--pc); }

/* ---------- action bar ---------- */
.cq-bar { position: relative; flex: none; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; min-height: 58px; padding: 8px 120px 8px 12px;
  border-radius: 14px; background: linear-gradient(180deg, #121826, #0d121c); border: 1px solid rgba(255,255,255,.08); }
.cq-bar.mine { border-color: rgba(242,193,78,.42); box-shadow: 0 0 0 1px rgba(242,193,78,.12), 0 -10px 30px -18px rgba(242,193,78,.55); }
.cq-prompt { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 10px; }
.cq-pt-w { display: flex; flex-direction: column; min-width: 0; }
.cq-pt { font: 600 15.5px var(--ui); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-ps { font-size: 12px; color: #9aa4b5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-count { flex: none; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 19px; display: grid; place-items: center; font: 700 19px var(--ui); color: #1a1405; background: #f2c14e; box-shadow: 0 0 18px rgba(242,193,78,.45); font-variant-numeric: tabular-nums; }
.cq-count.done { background: #2fbf8f; color: #04140e; box-shadow: 0 0 18px rgba(47,191,143,.45); }
.cq-vs { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 10px; font-size: 12px; background: #0a0f18; border: 1.5px solid #fff; vertical-align: 1px; }
.cq-vs.def { border-color: var(--pc); }
.cq-clock { flex: none; margin-left: auto; font: 700 13px var(--ui); color: #9aa4b5; font-variant-numeric: tabular-nums; }
.cq-clock:empty { display: none; }
.cq-clock.low { color: #ff5d62; }
.cq-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cq-acts > button, .cq-blitz > button { min-height: 40px; }
.cq-go { font-weight: 700; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 6px; }
.cq-go svg { width: 16px; height: 16px; }
.cq-go.blitz { background: #3a1d0d; border-color: #f2a93b; color: #ffd9a3; }
.cq-go.blitz:hover:not(:disabled) { background: #4b2610; border-color: #ffc069; }
.cq-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.cq-seg button { min-height: 38px; min-width: 38px; padding: 0 10px; border: 0; border-radius: 0; background: var(--raise); font: 700 15px var(--ui); }
.cq-seg button + button { border-left: 1px solid var(--line-2); }
.cq-seg button.on { background: #f2c14e; color: #1a1405; }
.cq-blitz { display: inline-flex; align-items: center; gap: 4px; }
.cq-step { display: inline-flex; align-items: center; gap: 4px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); font-size: 12px; color: #b8c2d2; }
.cq-step button { min-height: 30px; width: 30px; padding: 0; border-radius: 6px; font: 700 16px var(--ui); }
.cq-step b { color: #fff; }
.cq-step.big b { min-width: 30px; text-align: center; font-size: 18px; }
.cq-step.big button { min-height: 36px; width: 36px; }
.cq-range { width: 130px; accent-color: #f2c14e; }
.cq-cardsbtn { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cq-cardsbtn svg { width: 14px; height: 14px; color: #8f9ab0; }
.cq-cardsbtn.ready svg { color: #f2c14e; }
.cq-cardsbtn.must { border-color: #f2c14e; animation: cqPulse 1.4s ease-in-out infinite; }
.cq-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; background: #2a3142; }
.cq-cardsbtn.ready .cq-badge { background: #f2c14e; color: #1a1405; }
@keyframes cqPulse { 50% { box-shadow: 0 0 0 4px rgba(242,193,78,.25); } }
.cq-timebar { position: absolute; left: 12px; right: 12px; top: -1px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.06); overflow: hidden; }
.cq-timebar i, .cq-timer i { display: block; height: 100%; width: 100%; background: #f2c14e; transition: width .25s linear; }
.cq-timebar.low i, .cq-timer.low i { background: #ff5d62; }

/* ---------- players + continents (desktop side column) ---------- */
.cq-side { display: flex; flex-direction: column; gap: 6px; }
.cq-side-h { display: flex; justify-content: space-between; align-items: baseline; font: 600 11px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); padding: 0 2px; }
.cq-side-h .muted { letter-spacing: .04em; text-transform: none; font-weight: 500; }
.cq-plist, .cq-clist { display: grid; gap: 5px; }
.cq-plist + .cq-side-h { margin-top: 6px; }
.cq-pl { position: relative; overflow: hidden; display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); }
.cq-pl::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.cq-pl.turn { border-color: var(--pc); box-shadow: 0 0 0 1px var(--pc), 0 8px 26px -14px var(--pc); background: color-mix(in srgb, var(--pc) 9%, rgba(255,255,255,.03)); }
.cq-pl.out { opacity: .45; }
.cq-pl.out .cq-pl-t b { text-decoration: line-through; }
.cq-pl-t { display: flex; flex-direction: column; min-width: 0; gap: 3px; flex: 1; }
.cq-pl-t b { display: flex; align-items: center; gap: 5px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-pl-t small { font-weight: 400; color: #9aa4b5; }
.cq-pl-s { display: flex; align-items: center; gap: 10px; font: 600 12px var(--ui); color: #c9d1de; font-variant-numeric: tabular-nums; }
.cq-st { display: inline-flex; align-items: center; gap: 3px; }
.cq-st svg { color: #6f7a8e; }
.cq-pl-sub { flex: none; font-size: 11px; color: var(--pc); font-weight: 600; text-transform: lowercase; }
.cq-tag { font-size: 9.5px; font-weight: 600; padding: 1px 5px; border-radius: 6px; background: rgba(255,255,255,.08); color: #aab3c2; }
.cq-tag.warn { background: rgba(242,169,59,.16); color: #f2a93b; }
.cq-ok { color: #2fbf8f; font-weight: 700; }
.cq-wait { color: #9aa4b5; font-weight: 500; font-style: italic; }
.cq-out { color: #9aa4b5; font-weight: 500; }
.cq-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.06); }
.cq-cont { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 4px 10px; border-radius: 9px; text-align: left; font-weight: 500; font-size: 12.5px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.06); }
.cq-cont.on { border-color: rgba(226,234,245,.7); background: rgba(226,234,245,.1); }
.cq-cont b { color: #f2c14e; font-weight: 700; }
.cq-cont-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-cont-m { font-size: 11px; font-variant-numeric: tabular-nums; }
.cq-holder { flex: none; display: inline-grid; place-items: center; }
.cq-holder .av { box-shadow: 0 0 0 1.5px var(--ac, #fff); }
html.phone-ui .cq-side { display: none; }

/* ---------- cards ---------- */
.cq-cards { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); width: min(660px, calc(100% - 16px)); z-index: 7; }
.cq-cards-in { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(12,17,27,.97); border: 1px solid rgba(242,193,78,.3); box-shadow: 0 24px 60px rgba(0,0,0,.7); }
.cq-cards-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cq-cards-h b { font: 600 15px var(--ui); }
.cq-cards-h .muted { flex: 1; }
.cq-cards-h button { min-height: 32px; margin-left: auto; }
.cq-cards-warn { margin: 0; padding: 7px 10px; border-radius: 8px; background: rgba(242,193,78,.12); color: #f2c14e; font-size: 12.5px; }
.cq-hand { display: flex; gap: 8px; flex-wrap: wrap; }
.cq-card { position: relative; width: 92px; min-height: 118px; padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 5px; border-radius: 12px;
  background: linear-gradient(170deg, #1d2536, #101521); border: 1.5px solid rgba(255,255,255,.12); transition: transform .12s, border-color .12s; }
.cq-card:hover:not(:disabled) { background: linear-gradient(170deg, #232c40, #131927); }
.cq-card.on { background: linear-gradient(170deg, #3a3018, #17140b); border-color: #f2c14e; transform: translateY(-5px); box-shadow: 0 10px 24px -10px rgba(242,193,78,.8); }
.cq-card-sym { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #e9eef6; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.16), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.12); }
.cq-card.wild .cq-card-sym { color: #f2c14e; border-color: rgba(242,193,78,.5); }
.cq-card-k { font: 700 10px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: #9aa4b5; }
.cq-card-t { font-size: 12px; line-height: 1.2; text-align: center; }
.cq-card-c { font-size: 10px; color: #8f9ab0; letter-spacing: .04em; }
.cq-card-plus { position: absolute; top: 6px; right: 6px; font: 800 10px var(--ui); padding: 1px 5px; border-radius: 6px; background: #2fbf8f; color: #04140e; }
.cq-cards-f { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.cq-cards-btns { display: flex; gap: 8px; margin-left: auto; }

/* ---------- message strip: under the map, above the action bar (nothing that is a message covers the map) ----------
   One row, always there during a game so the layout never jumps: the battle being replayed, a banner, a hint, or
   the latest event. Constant height: desktop 52px, phones 40px, short landscape 32px. */
.cq-msg { position: relative; flex: none; height: 52px; min-width: 0; overflow: hidden; border-radius: 12px; display: grid; align-items: center;
  background: linear-gradient(180deg, #0f1521, #0b1019); border: 1px solid rgba(255,255,255,.08); }
.cq-msg[data-cq="skip"] { cursor: pointer; }
.cq-m-in { position: relative; min-width: 0; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.cq-m-in > * { animation: cqMsgIn .26s cubic-bezier(.2,.9,.3,1.15); }
@keyframes cqMsgIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.cq-m-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-m-ic { flex: none; display: grid; place-items: center; }
/* the latest event: quiet */
.cq-m-log { display: flex; justify-content: center; padding: 0 14px; font-size: 13px; color: #aab3c2; }
.cq-m-log b { font-weight: 600; }
/* hints (taps that do nothing, a card earned, the shell's notes) and refusals */
.cq-m-hint { display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%; padding: 0 14px; font: 600 13.5px var(--ui); color: #e9eef6;
  background: linear-gradient(90deg, transparent, rgba(127,180,230,.10) 30%, rgba(127,180,230,.10) 70%, transparent); }
.cq-m-hint .cq-m-ic { color: #7fb4e6; }
.cq-m-hint.error { background: linear-gradient(90deg, transparent, rgba(255,93,98,.12) 30%, rgba(255,93,98,.12) 70%, transparent); }
.cq-m-hint.error .cq-m-ic { color: #ff5d62; }
/* chat lines and emotes (the shell's bubbles and pop-ups, here instead of over the board) */
.cq-m-chat { display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%; padding: 0 14px; font-size: 13px; color: #dfe5ee; }
.cq-m-chat b { font-weight: 700; margin-right: 2px; }
.cq-m-q { font: 700 22px/1 Georgia, serif; color: #6f7a8e; height: 14px; }
.cq-m-art { flex: none; display: grid; place-items: center; height: 100%; }
.cq-m-art svg { width: 28px; height: 32px; overflow: visible; }
.cq-m-art .rx-emo { font-size: 24px; filter: none; }
/* banners: elimination (red), final rounds (gold), your turn (your colour in the text) */
.cq-m-ban { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; padding: 0 14px; font: 600 15.5px var(--ui); color: #f1f4f9;
  --bc: 255,93,98; background: linear-gradient(90deg, transparent, rgba(var(--bc),.16) 25%, rgba(var(--bc),.16) 75%, transparent); box-shadow: inset 0 0 0 1px rgba(var(--bc),.45); border-radius: 12px; }
.cq-m-ban .cq-m-ic { color: rgb(var(--bc)); }
.cq-m-ban.final { --bc: 242,193,78; }
.cq-m-ban.turn { --bc: 242,193,78; }
.cq-m-ban.pause { --bc: 127,180,230; font-size: 14.5px; }
/* paused: the map dims lightly (no box, no blur), so it stays readable */
.cq-map { transition: filter .3s; }
.cq-host.cq-paused .cq-map { filter: brightness(.7) saturate(.7); }
/* the battle: attacker | dice ⚔ dice | defender, in the players' colours */
.cq-m-bt { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; height: 100%; padding: 0 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ac) 16%, transparent), transparent 34%, transparent 66%, color-mix(in srgb, var(--dc) 16%, transparent)); }
.cq-m-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cq-m-side.a { justify-content: flex-end; }
.cq-m-side.d { flex-direction: row-reverse; justify-content: flex-end; }
.cq-m-who { display: grid; min-width: 0; line-height: 1.2; }
.cq-m-side.a .cq-m-who { text-align: right; }
.cq-m-who b, .cq-m-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-m-who b { font-size: 13px; }
.cq-m-side.a .cq-m-who b { color: var(--ac); }
.cq-m-side.d .cq-m-who b { color: var(--dc); }
.cq-m-who small { font-size: 11px; color: #9aa4b5; }
.cq-m-dice { flex: none; display: flex; gap: 5px; min-height: 30px; align-items: center; }
.cq-m-dice .cq-die { width: 30px; height: 30px; }
.cq-m-loss { flex: none; min-width: 22px; font: 800 15px var(--ui); font-style: normal; color: #ff6b6b; font-variant-numeric: tabular-nums; }
.cq-m-side.a .cq-m-loss { text-align: left; }
.cq-m-side.d .cq-m-loss { text-align: right; color: #ffd166; }
.cq-m-mid { display: grid; justify-items: center; gap: 1px; color: #c9d1de; min-width: 44px; }
.cq-m-mid small { font: 700 9.5px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: #9aa4b5; }
.cq-m-mid b { font: 800 14px var(--ui); letter-spacing: .02em; color: var(--ac); white-space: nowrap; animation: cqWon .4s cubic-bezier(.2,.9,.3,1.3); }
@keyframes cqWon { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.cq-die { width: 32px; height: 32px; padding: 4px; border-radius: 7px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); background: var(--dc); box-shadow: inset 0 -3px 0 rgba(0,0,0,.28), 0 3px 8px rgba(0,0,0,.45); transition: opacity .2s, filter .2s; }
.cq-die i { display: block; place-self: center; width: 5.5px; height: 5.5px; border-radius: 50%; }
.cq-die i.p { background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.cq-die[data-light] i.p { background: #141922; box-shadow: none; }
.cq-die.lost { opacity: .7; filter: saturate(.3); position: relative; }
.cq-die.lost::after { content: ""; position: absolute; inset: 19%; background: linear-gradient(45deg, transparent 44%, #ff4d5e 44%, #ff4d5e 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #ff4d5e 44%, #ff4d5e 56%, transparent 56%); }
.cq-die.roll { animation: cqRoll .32s cubic-bezier(.2,.9,.3,1.3); }
@keyframes cqRoll { 0% { transform: rotate(-200deg) scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cq-die.lost.roll { animation: cqRoll .32s cubic-bezier(.2,.9,.3,1.3); }

/* ---------- game over ---------- */
.cq-over { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; padding: 12px; background: rgba(4,7,12,.62); backdrop-filter: blur(3px); }
.cq-over-box { width: min(620px, 100%); max-height: 100%; overflow: auto; text-align: center; padding: 22px 22px 18px; border-radius: 20px; background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--pc) 22%, #121826), #0d121c 70%); border: 1px solid color-mix(in srgb, var(--pc) 55%, transparent); box-shadow: 0 30px 80px rgba(0,0,0,.75); }
.cq-over-crown { display: grid; place-items: center; }
.cq-over-crown .av { box-shadow: 0 0 0 3px var(--pc), 0 0 40px var(--pc); }
.cq-over-k { margin: 12px 0 0; font: 600 10.5px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: #9aa4b5; }
.cq-over-box h2 { margin: 4px 0 12px; font-family: var(--title); font-size: 22px; letter-spacing: .04em; }
.cq-over-tbl { overflow-x: auto; }
.cq-over-box table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.cq-over-box th, .cq-over-box td { padding: 6px 6px; border-bottom: 1px solid rgba(255,255,255,.06); }
.cq-over-box thead th { font: 600 10px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: #8f96a7; }
.cq-over-box tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
.cq-over-box tbody th .cq-o-av { display: inline-block; vertical-align: middle; margin-right: 7px; }
.cq-over-box tr.win th { color: var(--pc); }
.cq-over-box tr.out { opacity: .6; }
.cq-over-act { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* ---------- desktop: the crown/voice tools sit at the right end of the action bar ---------- */
html:not(.phone-ui) .kind-conquer #game .board-tools { top: auto; bottom: 18px; right: 18px; flex-direction: row; }

/* ================= phones (portrait and landscape): one screen, top toolbar, map, action bar ================= */
html.phone-ui .kind-conquer #game .phone-top { position: fixed; top: 6px; right: 6px; z-index: 30; }
html.phone-ui .kind-conquer #game #gearBtn { width: 34px; height: 34px; min-height: 34px; }
html.phone-ui .kind-conquer #game .game-grid { display: flex; flex-direction: column; }
html.phone-ui .kind-conquer #game .board-wrap { order: 2; flex: 1 1 auto; min-height: 0; padding: 0; display: flex; flex-direction: column; }
html.phone-ui .kind-conquer:not(.sheet-open) #game .tabs-card { display: none !important; }
html.phone-ui .kind-conquer #game .game-top, html.phone-ui .kind-conquer #game .board-wrap > #feed { display: none !important; }
/* the shell's round buttons make one row along the top */
html.phone-ui .kind-conquer #game .board-wrap > .room-pass { top: 3px; left: 3px; width: 34px; height: 34px; padding: 0; justify-content: center; gap: 0; }
html.phone-ui .kind-conquer #game .room-pass .rp-code, html.phone-ui .kind-conquer #game .room-pass .rp-act, html.phone-ui .kind-conquer #game .room-pass .rp-eye { display: none; }
html.phone-ui .kind-conquer #game .board-fabs { flex-direction: row; top: 3px; bottom: auto; left: 41px; gap: 4px; }
html.phone-ui .kind-conquer #game .board-fabs .log-btn, html.phone-ui .kind-conquer #game #chatFab { display: grid; }
html.phone-ui .kind-conquer #game .board-fabs .log-btn, html.phone-ui .kind-conquer #game .board-fabs #emoteBtn, html.phone-ui .kind-conquer #game .board-fabs #chatFab { width: 34px; height: 34px; min-height: 34px; }
html.phone-ui .kind-conquer #game .board-tools { top: 3px; bottom: auto; right: 44px; flex-direction: row; gap: 4px; }
html.phone-ui .kind-conquer #game .board-tools .icon-btn { width: 34px; height: 34px; min-height: 34px; border-radius: 8px; font-size: 16px; }
html.phone-ui .kind-conquer #game #gameHost { flex: 1 1 auto; }

html.phone-ui .cq-host { padding: 41px 0 0; gap: 4px; }
/* chips grow to share the row but never shrink below their counts: with 5-6 players the strip scrolls sideways
   (names truncate first; territories, armies and cards are never clipped) */
html.phone-ui .cq-strip { position: relative; display: flex; gap: 4px; flex: none; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 0 2px; }
html.phone-ui .cq-strip::-webkit-scrollbar { display: none; }
html.phone-ui .cq-strip.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
html.phone-ui .cq-strip.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px); mask-image: linear-gradient(90deg, transparent, #000 22px); }
html.phone-ui .cq-strip.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); }
html.phone-ui .cq-strip .cq-pl { flex: 1 0 auto; min-width: 0; gap: 4px; padding: 3px 5px 3px 7px; border-radius: 9px; }
html.phone-ui .cq-strip.many .cq-pl > .av { display: none; }  /* 5-6 players: the colour bar names the player, the room goes to the counts */
html.phone-ui .cq-strip.many .cq-pl { padding-left: 8px; }
html.phone-ui .cq-strip .cq-pl::before { top: 5px; bottom: 5px; }
.cq-pl-col { flex: 1 0 auto; min-width: 0; display: grid; gap: 1px; }
/* the name adds no width of its own (width 0, stretched to the counts' width), so it truncates instead */
.cq-pl-n { width: 0; min-width: 100%; font-weight: 600; font-size: 11px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-pl-c { display: flex; align-items: center; gap: 5px; font: 700 11px/1.1 var(--ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cq-pl-c .cq-st { gap: 1px; flex: none; }
.cq-pl-c svg { flex: none; width: 12px; height: 12px; color: #8f9ab0; }
.cq-wait-dot { width: 7px; height: 7px; border-radius: 50%; background: #9aa4b5; animation: cqBlink 1.2s ease-in-out infinite; }
@keyframes cqBlink { 50% { opacity: .25; } }
html.phone-ui .cq-stage { border-radius: 10px; }
html.phone-ui .cq-zoom { top: 6px; right: 6px; padding: 3px; gap: 3px; }
html.phone-ui .cq-zoom button { width: 30px; height: 30px; min-height: 30px; font-size: 16px; }
html.phone-ui .cq-legend { display: flex; position: absolute; left: 6px; bottom: 6px; z-index: 3; gap: 3px; flex-wrap: wrap; max-width: calc(100% - 12px); pointer-events: auto; }
html.phone-ui .cq-legend .cq-cont { width: auto; min-height: 26px; padding: 2px 7px; gap: 4px; font-size: 11px; background: rgba(8,13,22,.84); border-color: rgba(255,255,255,.1); }
html.phone-ui .cq-legend .cq-cont-n { flex: none; }
html.phone-ui .cq-bar { padding: 7px 8px; min-height: 0; gap: 6px 8px; border-radius: 12px; }
html.phone-ui .cq-pt { font-size: 14px; }
html.phone-ui .cq-ps { font-size: 11px; }
html.phone-ui .cq-count { min-width: 32px; height: 32px; font-size: 16px; }
html.phone-ui .cq-acts { gap: 6px; }
html.phone-ui .cq-acts > button, html.phone-ui .cq-blitz > button { min-height: 38px; padding: 0 11px; }
html.phone-ui .cq-cards { bottom: 6px; width: calc(100% - 12px); }
html.phone-ui .cq-cards-in { padding: 10px; gap: 8px; max-height: calc(100dvh - 120px); overflow-y: auto; }
html.phone-ui .cq-card { width: 74px; min-height: 100px; padding: 8px 4px 6px; }
html.phone-ui .cq-card-sym { width: 38px; height: 38px; }
html.phone-ui .cq-card-sym svg { width: 24px; height: 24px; }
/* phones: a 40px strip; the battle row keeps both dice sets and losses whole, names truncate first */
html.phone-ui .cq-msg { height: 40px; border-radius: 10px; }
html.phone-ui .cq-m-log { font-size: 11.5px; padding: 0 10px; }
html.phone-ui .cq-m-hint { font-size: 12.5px; gap: 6px; padding: 0 10px; }
html.phone-ui .cq-m-chat { font-size: 12px; gap: 6px; padding: 0 10px; }
/* phones: a long note wraps to two lines of 12px inside the 40px strip (then ellipsis); desktop keeps one line */
html.phone-ui .cq-m-hint .cq-m-t, html.phone-ui .cq-m-chat .cq-m-t, html.phone-ui .cq-m-log .cq-m-t, html.phone-ui .cq-m-ban .cq-m-t {
  white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 12px; line-height: 1.28; text-align: center; overflow-wrap: anywhere; }
html.phone-ui .cq-m-art svg { width: 24px; height: 27px; }
html.phone-ui .cq-m-art .rx-emo { font-size: 20px; }
html.phone-ui .cq-m-ban { font-size: 13.5px; gap: 7px; padding: 0 10px; border-radius: 10px; }
html.phone-ui .cq-m-bt { gap: 6px; padding: 0 8px; }
html.phone-ui .cq-m-side { gap: 5px; }
html.phone-ui .cq-m-who b { font-size: 11.5px; }
html.phone-ui .cq-m-who small { font-size: 10px; }
html.phone-ui .cq-m-dice { gap: 3px; min-height: 24px; }
html.phone-ui .cq-m-dice .cq-die, html.phone-ui .cq-die { width: 24px; height: 24px; padding: 3px; border-radius: 6px; }
html.phone-ui .cq-die i { width: 4.2px; height: 4.2px; }
html.phone-ui .cq-m-loss { min-width: 18px; font-size: 13px; }
html.phone-ui .cq-m-mid { min-width: 0; }
html.phone-ui .cq-m-mid svg { width: 15px; height: 15px; }
html.phone-ui .cq-m-mid small { display: none; }
html.phone-ui .cq-m-mid b { font-size: 12px; }
@media (max-width: 380px) {
  html.phone-ui .cq-m-dice .cq-die { width: 20px; height: 20px; padding: 2.5px; border-radius: 5px; }
  html.phone-ui .cq-m-dice .cq-die i { width: 3.6px; height: 3.6px; }
  html.phone-ui .cq-m-dice { gap: 2px; }
  html.phone-ui .cq-m-bt { gap: 4px; padding: 0 6px; }
  html.phone-ui .cq-m-side { gap: 3px; }
  html.phone-ui .cq-m-loss { min-width: 16px; font-size: 12px; }
}

/* portrait: prompt on one row, buttons on the next (full width) */
@media (orientation: portrait) {
  html.phone-ui .cq-bar { flex-direction: column; align-items: stretch; }
  html.phone-ui .cq-prompt { flex: none; }
  html.phone-ui .cq-acts { justify-content: stretch; }
  html.phone-ui .cq-acts > button, html.phone-ui .cq-acts > .cq-blitz { flex: 1 1 auto; }
  html.phone-ui .cq-acts > .cq-blitz > button { flex: 1; }
  html.phone-ui .cq-bar.wide .cq-range { flex: 1 1 100px; width: auto; }
  html.phone-ui .cq-strip .cq-pl { min-width: 52px; }
}
/* landscape phones: the map gets the width; players ride in the top toolbar row; the bar is one row */
@media (orientation: landscape) {
  html.phone-ui .kind-conquer #game .game-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  html.phone-ui .kind-conquer #game .board-wrap { grid-column: 1; grid-row: 1; }
  html.phone-ui .cq-host { padding-top: 3px; }
  html.phone-ui .cq-strip { margin: 0 calc(44px + 3 * 38px + 8px) 0 calc(41px + 3 * 38px); min-height: 34px; }
  html.phone-ui .cq-strip .cq-pl { max-width: 160px; }
  html.phone-ui .cq-bar { flex-wrap: nowrap; padding: 5px 6px 5px 10px; }
  html.phone-ui .cq-prompt { flex: 1 1 auto; }
  html.phone-ui .cq-acts { flex-wrap: nowrap; }
  html.phone-ui .cq-acts > button, html.phone-ui .cq-blitz > button { min-height: 36px; }
  html.phone-ui .cq-cards { bottom: 6px; }
  html.phone-ui .cq-cards-in { max-height: calc(100dvh - 20px); }
  html.phone-ui .cq-legend { flex-direction: column; flex-wrap: nowrap; max-width: none; }
  html.phone-ui .cq-legend .cq-cont { min-height: 22px; padding: 1px 6px; }
}
@media (orientation: landscape) and (max-height: 430px) {
  /* short landscape: a 32px strip, names on one line (the territory after the player) */
  html.phone-ui .cq-msg { height: 32px; border-radius: 9px; }
  html.phone-ui .cq-m-hint .cq-m-t, html.phone-ui .cq-m-chat .cq-m-t, html.phone-ui .cq-m-log .cq-m-t, html.phone-ui .cq-m-ban .cq-m-t { font-size: 11px; line-height: 1.22; }
  html.phone-ui .cq-m-art svg { width: 20px; height: 23px; }
  html.phone-ui .cq-m-art .rx-emo { font-size: 17px; }
  html.phone-ui .cq-m-who { display: flex; align-items: baseline; gap: 5px; }
  html.phone-ui .cq-m-side.a .cq-m-who { justify-content: flex-end; }
  html.phone-ui .cq-m-who b { flex: 0 1 auto; min-width: 2.5em; }
  html.phone-ui .cq-m-who small { flex: 0 1 auto; min-width: 0; }
  html.phone-ui .cq-m-dice .cq-die { width: 22px; height: 22px; padding: 2.5px; }
  html.phone-ui .cq-m-dice .cq-die i { width: 3.8px; height: 3.8px; }
  html.phone-ui .cq-m-mid small { display: block; font-size: 8.5px; }
  html.phone-ui .cq-m-mid { grid-auto-flow: column; align-items: center; gap: 5px; }
  html.phone-ui .cq-pt { font-size: 13px; }
  html.phone-ui .cq-ps { font-size: 10.5px; }
  html.phone-ui .cq-count { min-width: 28px; height: 28px; font-size: 14px; }
  html.phone-ui .cq-acts > button, html.phone-ui .cq-blitz > button, html.phone-ui .cq-seg button { min-height: 32px; padding: 0 9px; }
  html.phone-ui .cq-seg button { min-width: 30px; }
  html.phone-ui .cq-step button { min-height: 28px; width: 28px; }
  html.phone-ui .cq-step.big button { min-height: 30px; width: 30px; }
  html.phone-ui .cq-range { width: 90px; }
  html.phone-ui .cq-card { width: 66px; min-height: 86px; }
  html.phone-ui .cq-cards-h .muted { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cq-hl.tgt, .cq-arrow, .cq-cardsbtn.must { animation: none; }
  .cq-float { animation: cqFade 1.6s ease-out forwards; }  /* no travelling numbers: they fade in place */
  .cq-die.roll, .cq-m-in > *, .cq-m-mid b { animation: none; }
}

/* spectators: the shell's Live / Leave console sits at the right end of the action bar */
.kind-conquer.spectating .spec-console { top: auto; left: auto; right: 18px; bottom: 17px; transform: none; }
.kind-conquer.spectating .cq-bar { padding-right: 250px; }
html.phone-ui .kind-conquer.spectating .spec-console { right: 6px; bottom: 7px; }
html.phone-ui .kind-conquer.spectating .cq-bar { padding-right: 214px; min-height: 52px; }

/* rounds: Quick counts down, Classic warns in its final rounds; card set value on the Cards button */
.cq-round { flex: none; margin-left: auto; padding: 3px 9px; border-radius: 999px; font: 700 11.5px var(--ui); letter-spacing: .02em; color: #c9d1de; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); white-space: nowrap; }
.cq-round.final { color: #1a1405; background: #f2c14e; border-color: #f2c14e; box-shadow: 0 0 14px rgba(242,193,78,.45); }
.cq-round + .cq-clock { margin-left: 8px; }
.cq-final { color: #f2c14e !important; font-weight: 700; }
.cq-nv { font: 600 10.5px var(--ui); color: #f2c14e; }
@media (orientation: landscape) and (max-height: 430px) { html.phone-ui .cq-nv { display: none; } }

@keyframes cqFade { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* attack title: names shrink before the army counts */
.cq-pt.flex { display: flex; align-items: center; gap: 5px; min-width: 0; }
.cq-pt.flex .cq-tn { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-pt.flex .cq-vs, .cq-pt.flex .cq-to { flex: none; }
.cq-bar button { white-space: nowrap; }

/* keyboard: "Skip to actions" is the first stop and shows only when focused */
.cq-skip { position: absolute; left: 8px; top: 8px; z-index: 12; transform: translateY(-200%); opacity: 0; pointer-events: none; }
.cq-skip:focus, .cq-skip:focus-visible { transform: none; opacity: 1; pointer-events: auto; }

/* off-screen territories of yours (zoomed in): arrows with a count at the stage's edge */
.cq-edges { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.cq-edge { position: absolute; top: 10px; pointer-events: auto; min-height: 40px; min-width: 52px; padding: 0 10px; display: inline-flex; align-items: center; gap: 4px; border-radius: 20px;
  background: rgba(8,13,22,.86); border: 1px solid rgba(226,234,245,.28); font: 700 17px var(--ui); color: #e9eef6; }
.cq-edge b { font-size: 13px; }
.cq-edge.l { left: 6px; }
.cq-edge.r { right: 56px; }
@media (orientation: landscape) { .cq-edge { top: 50%; transform: translateY(-50%); } .cq-edge.r { right: 6px; } }
html:not(.phone-ui) .cq-edge { top: 50%; transform: translateY(-50%); } html:not(.phone-ui) .cq-edge.r { right: 6px; }


/* phones: every touch target at least 40px */
html.phone-ui .cq-zoom button { width: 40px; height: 40px; min-height: 40px; }
html.phone-ui .cq-step button, html.phone-ui .cq-step.big button { width: 40px; min-height: 40px; }
html.phone-ui .cq-seg button { min-height: 40px; min-width: 40px; }
html.phone-ui .cq-acts > button, html.phone-ui .cq-blitz > button { min-height: 40px; }
@media (orientation: landscape) and (max-height: 430px) {
  html.phone-ui .cq-acts > button, html.phone-ui .cq-blitz > button, html.phone-ui .cq-seg button { min-height: 40px; }
  html.phone-ui .cq-step button, html.phone-ui .cq-step.big button { width: 40px; min-height: 40px; }
  html.phone-ui .cq-step { padding: 0; }
  html.phone-ui .cq-zoom { gap: 2px; padding: 2px; }
  html.phone-ui .cq-zoom button { width: 40px; height: 40px; min-height: 40px; }
  html.phone-ui .cq-bar { padding: 3px 4px 3px 8px; }
  html.phone-ui .cq-acts { gap: 4px; }
  html.phone-ui .cq-pt { font-size: 12.5px; }
  html.phone-ui .cq-range { width: 70px; }
}

/* game over on short screens: no big avatar, a tight table, buttons in one row */
.cq-over-act .big { width: auto; flex: 1 1 160px; min-height: 44px; }
@media (max-height: 560px) {
  .cq-over { padding: 6px; }
  .cq-over-box { padding: 10px 14px 10px; }
  .cq-over-crown { display: none; }
  .cq-over-k { margin-top: 0; }
  .cq-over-box h2 { font-size: 17px; margin: 2px 0 6px; }
  .cq-over-box th, .cq-over-box td { padding: 3px 5px; font-size: 12px; }
  .cq-over-act { margin-top: 8px; flex-wrap: nowrap; }
  .cq-over-act > * { min-height: 40px; }
}
.cq-step span { white-space: nowrap; }
@media (orientation: landscape) and (max-height: 430px) {
  /* attack/occupy/fortify rows: the round chip gives way so the territory names keep some room; the clock
     stays (compact), and the blitz stop reads "keep" in small letters over its number */
  html.phone-ui .cq-bar.wide .cq-round { display: none; }
  html.phone-ui .cq-bar.wide .cq-clock { margin-left: 6px; font-size: 12px; }
  html.phone-ui .cq-bar.wide .cq-step > span { display: grid; justify-items: center; font-size: 9px; line-height: 1; letter-spacing: .04em; color: #9aa4b5; min-width: 22px; }
  html.phone-ui .cq-bar.wide .cq-step > span b { font-size: 14px; line-height: 1.05; }
  html.phone-ui .cq-strip .cq-pl-c { gap: 4px; font-size: 10.5px; }
  html.phone-ui .cq-strip .cq-pl { padding: 2px 5px 2px 6px; gap: 4px; }
}

/* ---------- phones: the action bar never runs past the screen edge (360 / 320 px wide) ---------- */
html.phone-ui .cq-host, html.phone-ui .cq-bar, html.phone-ui .cq-prompt, html.phone-ui .cq-acts { min-width: 0; max-width: 100%; }
@media (orientation: portrait) { html.phone-ui .cq-ps { white-space: normal; } }

/* neutral army badges: no ring colour (a coloured ring always means a player) */
.cq-b.neutral .cq-b-ring { fill: #11141a; stroke: none; }
.cq-b.neutral .cq-b-n { fill: #c3c9d3; }
/* territory names that would touch another name stay hidden until you zoom closer */
.cq-map.names .cq-b.nm-off .cq-b-name { display: none; }

/* spectators following a hand: the cards are shown, not played */
.cq-card.ro { cursor: default; opacity: 1; }
.cq-card.ro:disabled { opacity: 1; }

/* ---------- How to play ---------- */
.cq-howto .cq-ht { width: min(420px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; }
.cq-ht-k { margin: 0 0 8px !important; font: 600 10.5px var(--ui) !important; letter-spacing: .16em; text-transform: uppercase; color: #9aa4b5 !important; }
.cq-ht-pic { min-height: 64px; display: grid; place-items: center; margin-bottom: 10px; padding: 10px 6px; border-radius: 14px; background: radial-gradient(120% 90% at 50% 20%, #0d2239, #050c17); border: 1px solid rgba(127,180,230,.14); }
.cq-ht p { font-size: 14px !important; line-height: 1.5; text-align: left; }
.cq-ht p b { color: #f2c14e; }
.cq-ht-row { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.cq-ht-op { font: 700 16px var(--ui); color: #c9d1de; }
.cq-ht-big { font: 700 26px var(--ui); color: #f2c14e; }
.cq-ht-chip { padding: 4px 9px; border-radius: 999px; font: 700 12px var(--ui); color: #1a1405; background: #f2c14e; }
.cq-ht-steps { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.cq-ht-steps span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font: 600 13px var(--ui); }
.cq-ht-steps b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #f2c14e; color: #1a1405; font-size: 12px; }
.cq-ht-steps i { font-style: normal; color: #9aa4b5; font-size: 18px; }
.cq-ht-dice { display: flex; align-items: center; gap: 12px; }
.cq-ht-dice > span { display: flex; gap: 5px; }
.cq-ht-dice > b { font: 700 12px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: #9aa4b5; }
.cq-ht-card { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; width: 58px; padding: 8px 4px 6px; border-radius: 10px; color: #e9eef6; background: linear-gradient(170deg, #1d2536, #101521); border: 1.5px solid rgba(255,255,255,.14); }
.cq-ht-card.wild { color: #f2c14e; border-color: rgba(242,193,78,.5); }
.cq-ht-card small { font: 700 9px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #9aa4b5; }
@media (max-height: 560px) { .cq-ht-pic { min-height: 0; padding: 6px; margin-bottom: 6px; } .cq-ht p { font-size: 13px !important; } .cq-howto .ht-card { padding: 12px 14px 10px; } .cq-howto .ht-card h3 { font-size: 18px; margin-bottom: 4px; } }

/* ---------- game over on phones: the results table fits the width (no sideways scroll) ---------- */
html.phone-ui .cq-over-box { padding-left: 10px; padding-right: 10px; }
html.phone-ui .cq-over-box table { table-layout: fixed; font-size: 12px; }
html.phone-ui .cq-over-box th, html.phone-ui .cq-over-box td { padding: 4px 2px; }
html.phone-ui .cq-over-box thead th { font-size: 8.5px; letter-spacing: .04em; white-space: normal; line-height: 1.15; vertical-align: bottom; }
html.phone-ui .cq-over-box tbody th { overflow: hidden; text-overflow: ellipsis; }
html.phone-ui .cq-over-box col.c-name { width: 34%; }
@media (max-width: 400px) { html.phone-ui .cq-over-box tbody th .cq-o-av { display: none; } }
/* small phones (360 / 320 px): the colour bar names each player and the strip keeps its room for the counts */
@media (orientation: portrait) and (max-width: 380px) {
  html.phone-ui .cq-strip .cq-pl > .av { display: none; }
  html.phone-ui .cq-strip .cq-pl { padding-left: 8px; }
}

/* ---------- release 2: placement stepper, target list, "Attack from", from → to above Attack / Blitz ---------- */
.cq-pstep { display: inline-flex; align-items: center; gap: 4px; padding: 2px 3px 2px 9px; border-radius: 9px; background: rgba(95,240,255,.07); border: 1px solid rgba(95,240,255,.35); }
.cq-ps-n { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; margin-right: 4px; font-size: 12.5px; white-space: nowrap; }
.cq-ps-n b { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.cq-ps-v { font: 700 13px var(--ui); color: #5ff0ff; font-variant-numeric: tabular-nums; }
.cq-pstep button { min-height: 34px; min-width: 40px; padding: 0 8px; font: 700 14px var(--ui); border-radius: 7px; }
.cq-tlist { display: flex; gap: 5px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.cq-tlist::-webkit-scrollbar { display: none; }
.cq-tchip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: 18px; font: 600 12.5px var(--ui); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); }
.cq-tchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 1.5px rgba(0,0,0,.4); }
.cq-tchip b { font-variant-numeric: tabular-nums; padding: 1px 6px; border-radius: 9px; background: #0a0f18; border: 1px solid var(--pc, #fff); font-size: 11.5px; }
.cq-tchip.own { border-color: rgba(242,193,78,.55); }
.cq-tchip.own b { border-color: #f2c14e; }
.cq-atk { display: inline-flex; flex-direction: column; align-items: stretch; gap: 2px; }
.cq-atk-b { display: inline-flex; gap: 8px; }
.cq-ft { font-size: 11px; color: #c9d1de; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.cq-ft b { color: #fff; }
.cq-rules { border-color: rgba(242,193,78,.5); color: #f2c14e; }
/* desktop: lists take the row they need */
html:not(.phone-ui) .cq-bar.wide .cq-tlist { flex: 1 1 260px; }
/* phones: the label is the prompt itself (directly above); the stepper and the lists take a full row */
html.phone-ui .cq-atk, html.phone-ui .cq-atk-b { display: contents; }
html.phone-ui .cq-ft { display: none; }
html.phone-ui .cq-acts > .cq-pstep, html.phone-ui .cq-acts > .cq-tlist { flex: 1 1 100%; }
html.phone-ui .cq-pstep { justify-content: space-between; padding-left: 8px; }
html.phone-ui .cq-pstep button { min-height: 40px; min-width: 44px; }
html.phone-ui .cq-tchip { min-height: 40px; }
@media (orientation: landscape) and (max-height: 430px) {
  html.phone-ui .cq-acts > .cq-pstep, html.phone-ui .cq-acts > .cq-tlist { flex: 0 1 auto; }
  html.phone-ui .cq-ps-n b { max-width: 70px; }
  html.phone-ui .cq-tlist { max-width: 46vw; }
}
.cq-calc { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; color: #c9d1de; text-align: left; }
.cq-calc li { padding: 3px 8px; border-left: 3px solid var(--pc); border-radius: 4px; background: rgba(255,255,255,.03); }
.cq-calc li b:first-child { color: var(--pc); }
@media (max-height: 560px) { .cq-calc { font-size: 11.5px; margin-top: 6px; } .cq-calc li { padding: 1px 6px; } }
html:not(.phone-ui) .cq-bar.wide .cq-acts { flex: 1 1 340px; min-width: 0; flex-wrap: nowrap; }
html:not(.phone-ui) .cq-bar.wide .cq-acts > :not(.cq-tlist) { flex: none; }
@media (max-width: 380px) {
  html.phone-ui .cq-pstep { gap: 3px; padding-left: 6px; }
  html.phone-ui .cq-pstep button { min-width: 40px; padding: 0 4px; }
  html.phone-ui .cq-ps-n { gap: 4px; margin-right: 2px; font-size: 11.5px; flex: 1 1 auto; min-width: 0; }
  html.phone-ui .cq-ps-n b { max-width: 64px; }
}

/* ---------- release 2 convenience: turn tracker, Quick score race, catch-up names ---------- */
.cq-trk { display: flex; align-items: center; gap: 4px; margin-bottom: 1px; font: 700 9.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #6f7a8e; white-space: nowrap; }
.cq-trk i { font-style: normal; }
.cq-trk i.done { color: #9aa4b5; }
.cq-trk i.on { color: #f2c14e; }
.cq-trk span { color: #4d5566; }
.cq-sc { display: inline-flex; align-items: center; padding: 0 5px; border-radius: 7px; font: 800 11px var(--ui); color: #1a1405; background: #f2c14e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cq-pl-s .cq-sc { margin-left: 2px; }
.cq-race { margin: 0 2px 2px; padding: 5px 8px; border-radius: 8px; font-size: 12px; color: #f2c14e; background: rgba(242,193,78,.08); border: 1px solid rgba(242,193,78,.25); }
.cq-m-tn { display: inline; min-height: 0; padding: 0; margin: 0; border: 0; background: none; color: #fff; font: inherit; font-weight: 700; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
html.phone-ui .cq-trk { font-size: 9px; letter-spacing: .08em; }
@media (orientation: landscape) and (max-height: 430px) { html.phone-ui .cq-trk { display: none; } }
.cq-pl-nr { display: flex; align-items: center; gap: 4px; min-width: 0; }
.cq-pl-nr .cq-pl-n { flex: 1 1 0; width: 0; min-width: 0; }
.cq-pl-nr .cq-sc { flex: none; font-size: 10px; padding: 0 4px; line-height: 1.35; }

/* ---------- release 2 E: streaks in the strip ---------- */
.cq-m-ban.rampage { --bc: 255,110,40; font-size: 16.5px; }
.cq-m-rage { font: 900 italic 17px var(--ui); letter-spacing: .08em; color: #ff8a3d; text-shadow: 0 0 14px rgba(255,110,40,.65); animation: cqRage .5s cubic-bezier(.2,.9,.3,1.4); }
@keyframes cqRage { from { transform: scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }
.cq-m-x { font: 900 italic 11px var(--ui); letter-spacing: .06em; color: #ff8a3d; font-style: italic; white-space: nowrap; }
html.phone-ui .cq-m-rage { font-size: 14px; }
html.phone-ui .cq-m-x { font-size: 10px; }
@media (prefers-reduced-motion: reduce) { .cq-m-rage { animation: none; } }
