/* Ludo Conquista – medieval UI: parchment, carved wood, gold and wax seals */

:root {
  --ink: #3b2412;
  --ink-soft: #6b4a2b;
  --gold: #e9c46a;
  --gold-deep: #b8862b;
  --wood: #5a3a1e;
  --wood-dark: #2e1c0e;
  --blood: #8e1f17;
  --parchment: #f1dfb5;
  --font-title: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-head: 'Cinzel', Georgia, serif;
  --font-body: 'IM Fell English', Georgia, serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #2a1a0e;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.cq-stage, .cq-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.cq-canvas { touch-action: none; }
.cq-vignette {
  position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(30, 15, 5, 0.55) 100%);
}

/* ── shared pieces ─────────────────────────────── */

.cq-parchment {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 248, 225, 0.5), transparent 70%),
    url('../img/conquista/parchment.jpg') center / 380px,
    linear-gradient(#f3e2b8, #e3c891);
  border: 3px solid #7a5230;
  box-shadow:
    inset 0 0 0 2px rgba(233, 196, 106, 0.7),
    inset 0 0 40px rgba(122, 82, 48, 0.45),
    0 14px 40px rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  color: var(--ink);
}

.cq-card {
  position: relative;
  width: min(92vw, 440px);
  padding: 34px 28px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.cq-card::before, .cq-card::after {
  content: '❦';
  position: absolute;
  top: 6px;
  font-size: 20px;
  color: var(--gold-deep);
}
.cq-card::before { left: 10px; }
.cq-card::after { right: 10px; transform: scaleX(-1); }
.cq-card p { margin: 0; line-height: 1.4; }

.cq-title {
  margin: 0 0 4px;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(22px, 4vw, 30px);
  color: var(--blood);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.8);
  letter-spacing: 0.02em;
}

.cq-seal {
  position: relative;
  width: 64px; height: 64px;
  margin: -6px auto 4px;
  display: grid; place-items: center;
  font-size: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d0a33c, #9b6a16 60%, #6b4508);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.35), 0 4px 10px rgba(0, 0, 0, 0.4);
  border: 3px dashed rgba(255, 230, 160, 0.5);
}
.cq-seal--red { background: radial-gradient(circle at 35% 30%, #d0463a, #8e1f17 60%, #5a0f0a); color: #ffe3c8; }

.cq-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.03em;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.12s, filter 0.12s, box-shadow 0.12s;
  position: relative;
}
.cq-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.cq-btn:active:not(:disabled) { transform: translateY(1px); }
.cq-btn:disabled { cursor: not-allowed; filter: grayscale(0.8) brightness(0.8); opacity: 0.7; }
.cq-btn--gold {
  color: #3b2005;
  background: linear-gradient(#ffe39a, #e9b949 45%, #b8862b);
  border: 2px solid #7a5208;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 5px 0 #5c3d07, 0 8px 18px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.cq-btn--wood {
  color: #f6e3bd;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 3px, transparent 3px 11px),
    linear-gradient(#7a4f2a, #5a3a1e);
  border: 2px solid #2e1c0e;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.3), 0 4px 0 #2e1c0e, 0 6px 14px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 1px #000;
}
.cq-btn--big { font-size: 20px; padding: 15px 24px; }

.cq-input {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #7a5230;
  background: rgba(255, 248, 225, 0.7);
  color: var(--ink);
  min-width: 0;
  user-select: text;
}
.cq-link { color: var(--ink-soft); font-style: italic; }
.cq-small { font-size: 14px; color: var(--ink-soft); font-style: italic; }

.cq-iconbtn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid #2e1c0e;
  background: radial-gradient(circle at 35% 30%, #8a5d33, #4a2f17);
  color: #fff;
  font-size: 21px;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(233, 196, 106, 0.55), 0 4px 10px rgba(0, 0, 0, 0.45);
  display: grid; place-items: center;
  transition: transform 0.12s;
}
.cq-iconbtn:hover { transform: scale(1.08); }
.cq-iconbtn.is-on { background: radial-gradient(circle at 35% 30%, #ffe39a, #c99a2e 60%, #7a5208); color: #2e1c0e; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 0 16px rgba(233, 196, 106, 0.9), 0 4px 10px rgba(0, 0, 0, 0.45); }

.cq-plank {
  font-family: var(--font-head);
  font-weight: 700;
  color: #f6e3bd;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 6px;
  border: 2px solid #2e1c0e;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 3px, transparent 3px 12px), linear-gradient(#7a4f2a, #4f3219);
  box-shadow: inset 0 0 0 1px rgba(233, 196, 106, 0.4), 0 4px 10px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 15px;
}
.cq-plank b { color: var(--gold); letter-spacing: 0.15em; }

/* ── top bar ───────────────────────────────────── */

.cq-topbar {
  position: fixed;
  top: calc(10px + var(--safe-top));
  left: 12px; right: 12px;
  display: flex; align-items: center; gap: 10px;
  z-index: 30;
  pointer-events: none;
}
.cq-topbar > * { pointer-events: auto; }
.cq-topbar__tools { margin-left: auto; display: flex; gap: 8px; }
.cq-audio-wrap { position: relative; }
.cq-audio {
  position: absolute; right: 0; top: 54px;
  width: 230px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--font-head); font-size: 14px;
}
.cq-audio label { display: flex; flex-direction: column; gap: 4px; }
.cq-audio__check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.cq-audio input[type=range] { accent-color: var(--blood); }

/* ── screens ───────────────────────────────────── */

.cq-screen {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  z-index: 10;
  padding: 70px 12px 20px;
}
body[data-screen="auth"] [data-screen-id="auth"],
body[data-screen="error"] [data-screen-id="error"],
body[data-screen="menu"] [data-screen-id="menu"],
body[data-screen="lobby"] [data-screen-id="lobby"] { display: flex; animation: cq-unroll 0.5s ease-out; }
body[data-screen="game"] [data-screen-id="game"] { display: block; padding: 0; pointer-events: none; }
body[data-screen="game"] [data-screen-id="game"] > * { pointer-events: auto; }

@keyframes cq-unroll {
  from { opacity: 0; transform: scaleY(0.6) translateY(-20px); }
  to { opacity: 1; transform: none; }
}

/* loader */
.cq-loader {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(circle, #4a2f17, #1a0f06);
  color: var(--gold);
  font-family: var(--font-head); font-size: 20px;
  transition: opacity 0.6s;
}
.cq-loader.is-hidden { opacity: 0; pointer-events: none; }
.cq-loader__shield {
  width: 90px; height: 104px;
  display: grid; place-items: center;
  font-size: 44px;
  background: linear-gradient(135deg, #c0392b 50%, #2f5fb3 50%);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
  animation: cq-bob 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 0 #e9c46a);
}
@keyframes cq-bob { 50% { transform: translateY(-10px) rotate(-6deg); } }

/* menu */
.cq-menu { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cq-logo { text-align: center; color: #fff4d6; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6)); }
.cq-logo__small { font-family: var(--font-head); font-weight: 900; font-size: 22px; letter-spacing: 0.6em; color: var(--gold); text-shadow: 0 2px 0 #4a2a10, 0 0 10px rgba(0, 0, 0, 0.7); }
.cq-logo__big {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(44px, 10vw, 86px);
  line-height: 1;
  background: linear-gradient(#fff3c4, #e9c46a 45%, #a8741c 55%, #f8dd8a);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1.5px #4a2a08;
}
.cq-logo__ribbon {
  display: inline-block; margin-top: 10px;
  padding: 6px 26px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  color: #ffe9c0;
  background: linear-gradient(#a8281e, #7a1810);
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
}
.cq-menu__card { gap: 14px; }
.cq-greet { font-size: 19px; }
.cq-join { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

/* lobby */
.cq-lobby { width: min(96vw, 880px); max-height: calc(100vh - 90px); overflow: auto; gap: 16px; }
.cq-lobby__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cq-code {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 18px;
  border: 2px dashed #7a5230; border-radius: 8px;
  background: rgba(255, 248, 225, 0.55);
  cursor: pointer;
  font-family: var(--font-head);
  color: var(--ink);
}
.cq-code span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.cq-code b { font-size: 28px; letter-spacing: 0.3em; color: var(--blood); }
.cq-code small { font-size: 11px; font-style: italic; }

.cq-houses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cq-house {
  --c: #888;
  --d: #333;
  position: relative;
  padding: 0 10px 14px;
  border-radius: 6px;
  background: linear-gradient(rgba(255, 250, 235, 0.75), rgba(240, 220, 180, 0.6));
  border: 2px solid #8a6a40;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-height: 250px;
}
.cq-house.is-me { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(233, 196, 106, 0.8); }
.cq-house__banner {
  width: 78%;
  height: 92px;
  margin-top: -2px;
  display: grid; place-items: center;
  font-size: 40px;
  background: linear-gradient(var(--c), var(--d));
  clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%);
  box-shadow: inset 0 0 0 4px rgba(233, 196, 106, 0.8);
  animation: cq-wave 3s ease-in-out infinite;
  transform-origin: top center;
}
@keyframes cq-wave { 50% { transform: skewX(-3deg) scaleY(0.97); } }
.cq-house__name { font-family: var(--font-head); font-weight: 900; font-size: 18px; color: var(--d); }
.cq-house__who { min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 16px; text-align: center; word-break: break-word; }
.cq-house__who img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--c); object-fit: cover; }
.cq-tag { font-family: var(--font-head); font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--wood); color: #f6e3bd; }
.cq-tag--host { background: var(--gold-deep); color: #2e1c0e; }
.cq-tag--me { background: var(--blood); }
.cq-house__empty { font-style: italic; color: var(--ink-soft); }
.cq-house__actions { margin-top: auto; display: flex; flex-direction: column; gap: 6px; width: 100%; }
.cq-house__actions .cq-btn { font-size: 14px; padding: 8px 10px; }
.cq-house select, .cq-settings select {
  font-family: var(--font-head);
  font-size: 14px;
  padding: 6px;
  border-radius: 6px;
  border: 2px solid #7a5230;
  background: rgba(255, 248, 225, 0.85);
  color: var(--ink);
}
.cq-settings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; font-family: var(--font-head); font-size: 14px; }
.cq-settings label { display: flex; flex-direction: column; gap: 4px; }
.cq-settings.is-locked select { pointer-events: none; opacity: 0.7; }
.cq-lobby__hint { font-style: italic; min-height: 1.2em; }
.cq-lobby__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── in-game HUD ───────────────────────────────── */

.cq-scroll {
  position: fixed;
  top: calc(66px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  max-width: 92vw;
  padding: 10px 40px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 900; font-size: 20px;
  color: var(--ink);
  background: url('../img/conquista/parchment.jpg') center / 300px, #ecd7a6;
  border-top: 3px solid #7a5230;
  border-bottom: 3px solid #7a5230;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}
.cq-scroll::before, .cq-scroll::after {
  content: '';
  position: absolute; top: -8px; bottom: -8px; width: 18px;
  border-radius: 9px;
  background: linear-gradient(90deg, #5a3a1e, #a8743c, #5a3a1e);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}
.cq-scroll::before { left: -10px; }
.cq-scroll::after { right: -10px; }
.cq-scroll.is-mine { color: var(--blood); animation: cq-pulse 1.4s ease-in-out infinite; }
.cq-scroll.is-new { animation: cq-scroll-in 0.6s ease-out; }
@keyframes cq-scroll-in { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
@keyframes cq-pulse { 50% { box-shadow: 0 0 26px rgba(233, 196, 106, 0.95), 0 8px 20px rgba(0, 0, 0, 0.45); } }
.cq-scroll__emblem { font-size: 26px; }

.cq-round {
  position: fixed;
  top: calc(122px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  color: #ffe9c0;
  text-shadow: 0 1px 3px #000;
  pointer-events: none !important;
}
.cq-round.is-sudden { color: #ff7a6a; font-size: 16px; }

.cq-players {
  position: fixed;
  left: 12px;
  top: calc(70px + var(--safe-top));
  display: flex; flex-direction: column; gap: 8px;
  width: 210px;
}
.cq-pl {
  --c: #888;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 7px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(40, 25, 12, 0.85), rgba(40, 25, 12, 0.6));
  border: 2px solid rgba(233, 196, 106, 0.35);
  border-left: 6px solid var(--c);
  color: #f6e3bd;
  transition: transform 0.25s, box-shadow 0.25s;
}
.cq-pl.is-turn { transform: translateX(8px); border-color: var(--gold); box-shadow: 0 0 16px rgba(233, 196, 106, 0.7); }
.cq-pl.is-off { opacity: 0.55; }
.cq-pl__emblem {
  width: 40px; height: 46px;
  display: grid; place-items: center;
  font-size: 22px;
  background: var(--c);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 100%, 0 60%);
}
.cq-pl__name { font-family: var(--font-head); font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-pl__crowns { font-size: 15px; letter-spacing: 1px; }
.cq-pl__crowns .off { filter: grayscale(1) brightness(0.6); opacity: 0.45; }
.cq-pl__sub { font-size: 12px; opacity: 0.8; }

.cq-actionbar {
  position: fixed;
  left: 50%; bottom: calc(18px + var(--safe-bottom));
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(94vw, 520px);
}
.cq-actionbar__row { display: flex; gap: 10px; }
.cq-actionbar__row .cq-btn { white-space: nowrap; }
/* while choosing a move only "stay" makes sense: hide the greyed-out die */
.cq-actionbar__row:has([data-pass]:not([hidden])) [data-roll] { display: none; }
.cq-hint {
  margin: 0;
  padding: 6px 16px;
  font-size: 17px;
  font-style: italic;
  color: #fff4d6;
  text-align: center;
  text-shadow: 0 1px 3px #000, 0 0 10px #000;
  min-height: 1.3em;
}
.cq-btn--die { font-size: 22px; padding: 16px 30px; }
.cq-btn--die:not(:disabled) { animation: cq-glow 1.2s ease-in-out infinite; }
.cq-btn--die:not(:disabled) .cq-die-ico { display: inline-block; animation: cq-shake 1.2s ease-in-out infinite; }
@keyframes cq-glow { 50% { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 5px 0 #5c3d07, 0 0 32px rgba(255, 220, 120, 0.95); } }
@keyframes cq-shake { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-18deg); } 90% { transform: rotate(14deg); } }

.cq-timer { position: relative; width: 46px; height: 46px; }
.cq-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cq-timer circle { fill: rgba(40, 25, 12, 0.85); stroke: rgba(255, 255, 255, 0.15); stroke-width: 4; }
.cq-timer .cq-timer__arc { fill: none; stroke: var(--gold); stroke-dasharray: 106.8; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.cq-timer.is-low .cq-timer__arc { stroke: #ff5a4a; }
.cq-timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); color: #fff; font-size: 15px; }

.cq-sidebtns {
  position: fixed;
  right: 12px;
  bottom: calc(18px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 8px;
}
.cq-emotes {
  position: absolute; right: 56px; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 40px); gap: 4px;
  padding: 8px;
}
.cq-emotes button { font-size: 24px; background: none; border: 0; cursor: pointer; border-radius: 6px; }
.cq-emotes button:hover { background: rgba(122, 82, 48, 0.2); }

/* countdown */
.cq-countdown {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  pointer-events: none;
}
.cq-countdown span {
  font-family: var(--font-title); font-weight: 900;
  font-size: 160px;
  color: var(--gold);
  -webkit-text-stroke: 3px #4a2a08;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  animation: cq-count 1s ease-out;
}
@keyframes cq-count { from { transform: scale(2.4); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); } }

/* overlays */
.cq-overlay {
  position: fixed; inset: 0; z-index: 45;
  display: grid; place-items: center;
  background: rgba(20, 10, 4, 0.55);
  backdrop-filter: blur(2px);
  padding: 16px;
}
.cq-overlay[hidden] { display: none; }
.cq-overlay > .cq-card { animation: cq-unroll 0.45s ease-out; max-height: calc(100vh - 32px); overflow: auto; }
.cq-close {
  position: absolute; top: 10px; right: 12px;
  border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--blood);
  z-index: 1;
}

.cq-win { width: min(94vw, 480px); }
.cq-win__crest {
  width: 110px; height: 128px;
  margin: -6px auto 0;
  display: grid; place-items: center;
  font-size: 54px;
  clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%);
  background: linear-gradient(#c0392b, #6e1a12);
  box-shadow: inset 0 0 0 6px var(--gold);
  animation: cq-crest 1.6s ease-in-out infinite;
}
@keyframes cq-crest { 50% { transform: translateY(-6px) scale(1.04); } }
.cq-stats { width: 100%; border-collapse: collapse; font-size: 16px; }
.cq-stats th { font-family: var(--font-head); border-bottom: 2px solid #7a5230; padding: 4px; }
.cq-stats td { padding: 5px 4px; border-bottom: 1px dashed rgba(122, 82, 48, 0.4); }
.cq-stats td:first-child { text-align: left; }

.cq-rules { width: min(94vw, 600px); text-align: left; }
.cq-rules .cq-title { text-align: center; }
.cq-rules__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cq-rules__list li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; font-size: 17px; line-height: 1.35; }
.cq-rules__list li > span { font-size: 26px; text-align: center; }
.cq-rules__map { font-size: 14px; line-height: 1.1; text-align: center; letter-spacing: 1px; padding: 6px; }
.cq-credits { font-size: 12px; color: #4a3520; margin: 4px 0 10px; }
.cq-credits summary { cursor: pointer; font-family: var(--cq-font-display, inherit); letter-spacing: 0.5px; }
.cq-credits ul { margin: 6px 0 0; padding-left: 18px; max-height: 120px; overflow: auto; }
.cq-credits a { color: #7a2a12; }

/* ── notifications ─────────────────────────────── */

.cq-toasts {
  position: fixed;
  top: calc(150px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  width: min(92vw, 460px);
}
.cq-toast {
  position: relative;
  padding: 10px 22px 10px 52px;
  min-height: 46px;
  display: flex; align-items: center;
  font-size: 17px;
  background: url('../img/conquista/parchment.jpg') center / 300px, #ecd7a6;
  border: 2px solid #7a5230;
  border-radius: 4px;
  box-shadow: inset 0 0 18px rgba(122, 82, 48, 0.4), 0 8px 18px rgba(0, 0, 0, 0.45);
  color: var(--ink);
  animation: cq-toast-in 0.4s ease-out, cq-toast-out 0.4s ease-in forwards;
  animation-delay: 0s, var(--life, 3s);
}
.cq-toast__icon {
  position: absolute; left: -10px; top: 50%;
  width: 48px; height: 48px; margin-top: -24px;
  display: grid; place-items: center;
  font-size: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d0463a, #8e1f17 60%, #5a0f0a);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  border: 2px dashed rgba(255, 210, 180, 0.45);
}
.cq-toast--gold .cq-toast__icon { background: radial-gradient(circle at 35% 30%, #ffe39a, #c99a2e 60%, #7a5208); }
.cq-toast--good { border-color: #2e6b3a; }
@keyframes cq-toast-in { from { transform: translateY(-16px) scale(0.9); opacity: 0; } }
@keyframes cq-toast-out { to { transform: translateY(-10px); opacity: 0; } }

.cq-stickies {
  position: fixed;
  right: 12px;
  top: calc(70px + var(--safe-top));
  z-index: 34;
  display: flex; flex-direction: column; gap: 10px;
  width: min(70vw, 280px);
}
.cq-sticky {
  position: relative;
  padding: 12px 30px 12px 16px;
  font-size: 15px;
  line-height: 1.3;
  background:
    linear-gradient(rgba(255, 248, 225, 0.35), rgba(255, 248, 225, 0)),
    url('../img/conquista/parchment.jpg') center / 300px, #ecd7a6;
  border-radius: 2px 2px 10px 10px;
  box-shadow: inset 0 0 22px rgba(122, 82, 48, 0.5), 0 10px 20px rgba(0, 0, 0, 0.45);
  border: 2px solid #7a5230;
  animation: cq-sticky-in 0.5s ease-out;
  color: var(--ink);
}
.cq-sticky::before {
  /* hanging cords */
  content: '';
  position: absolute; left: 20%; right: 20%; top: -10px; height: 10px;
  border: 2px solid #7a5230; border-bottom: 0; border-radius: 10px 10px 0 0;
}
.cq-sticky b { font-family: var(--font-head); color: var(--blood); display: block; margin-bottom: 2px; }
.cq-sticky__seal {
  position: absolute; right: -12px; bottom: -12px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d0463a, #8e1f17 60%, #5a0f0a);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  border: 2px dashed rgba(255, 210, 180, 0.45);
}
.cq-sticky--gold .cq-sticky__seal { background: radial-gradient(circle at 35% 30%, #ffe39a, #c99a2e 60%, #7a5208); }
.cq-sticky__x { position: absolute; top: 4px; right: 6px; border: 0; background: none; cursor: pointer; color: var(--ink-soft); font-size: 15px; }
.cq-sticky.is-leaving { animation: cq-sticky-out 0.35s ease-in forwards; }
@keyframes cq-sticky-in { from { transform: translateY(-40px) rotate(-4deg); opacity: 0; } 70% { transform: translateY(4px) rotate(1deg); } }
@keyframes cq-sticky-out { to { transform: translateX(60px) rotate(6deg); opacity: 0; } }

.cq-herald {
  position: fixed; inset: 0; z-index: 36;
  display: grid; place-items: center;
  pointer-events: none;
}
.cq-herald__card {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 60px;
  background: url('../img/conquista/parchment.jpg') center / 300px, #ecd7a6;
  border-top: 4px solid #7a5230;
  border-bottom: 4px solid #7a5230;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: cq-herald 2.4s ease-in-out forwards;
  text-align: center;
}
.cq-herald__icon { font-size: 54px; margin-top: -48px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); }
.cq-herald__title { font-family: var(--font-title); font-weight: 900; font-size: clamp(24px, 5vw, 40px); color: var(--blood); }
.cq-herald__sub { font-size: 18px; font-style: italic; }
@keyframes cq-herald {
  0% { transform: scaleX(0); opacity: 0; }
  15% { transform: scaleX(1.05); opacity: 1; }
  22% { transform: scaleX(1); }
  82% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleY(0.2); opacity: 0; }
}

/* ── battle HUD: player cards ─────────────────── */

.cq-players { width: 236px; }
.cq-pl { grid-template-columns: 40px 1fr; align-items: start; }
.cq-pl__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cq-pl__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cq-pl__relics { font-size: 14px; letter-spacing: 1px; white-space: nowrap; }
.cq-pl__relics .off { filter: grayscale(1) brightness(0.6); opacity: 0.45; }
.cq-pl__camp {
  position: relative; height: 16px; border-radius: 4px; overflow: hidden;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(233, 196, 106, 0.4);
  font-family: var(--font-head); font-size: 11px; line-height: 14px; color: #fff4d6;
}
.cq-pl__camp i { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, #8a6a30, #c99a2e); transition: width 0.5s; }
.cq-pl__camp span { position: relative; padding-left: 5px; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.cq-pl__camp.is-siege { border-color: #ff5a4a; animation: cq-siege-pulse 1.2s ease-in-out infinite; }
.cq-pl.is-ruin .cq-pl__camp i { background: #4a3a2a; }
@keyframes cq-siege-pulse { 50% { box-shadow: 0 0 10px rgba(255, 90, 74, 0.9); } }
.cq-pl__pawns { display: flex; gap: 4px; }
.cq-mini {
  position: relative; flex: 1; height: 9px; border-radius: 3px; overflow: hidden;
  background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.2);
}
.cq-mini i { position: absolute; inset: 0; width: 0; background: #3cab6a; transition: width 0.5s; }
.cq-mini.is-mid i { background: #e0a526; }
.cq-mini.is-low i { background: #c0392b; }
.cq-mini.is-dead { border-style: dashed; opacity: 0.6; }
.cq-mini em { position: absolute; right: 1px; top: -4px; font-size: 9px; font-style: normal; line-height: 1; text-shadow: 0 0 2px #000; }
.cq-mini.is-dead em { left: 0; right: 0; text-align: center; top: -2px; font-family: var(--font-head); font-size: 9px; color: #fff; }
.cq-pl__skills { margin-left: 6px; letter-spacing: 1px; font-size: 11px; }
.cq-pl__eligible { margin-left: 3px; filter: drop-shadow(0 0 4px #ffd36a); animation: cq-pulse-text 1.4s ease-in-out infinite; }
.cq-pl__relics .ally { opacity: 0.75; filter: sepia(0.6); }
.cq-mini.is-crown { border-color: #ffd36a; box-shadow: 0 0 6px rgba(255, 211, 106, 0.9); }
.cq-pl__emblem { position: relative; }
.cq-pl__team {
  position: absolute; left: -4px; bottom: -4px;
  min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px;
  font-family: var(--font-head); font-weight: 900; font-size: 10px; line-height: 16px; text-align: center;
  background: #e9c46a; color: #2e1c0e; border: 1px solid #2e1c0e;
}
.cq-pl__team--b { background: #bfcbe0; }
.cq-pl.is-ally { border-color: rgba(125, 255, 154, 0.6); }
.cq-tag--team { background: #7a5208; }
.cq-tag--team-b { background: #3a4a6a; }
.cq-teampick { display: flex; gap: 4px; }
.cq-teampick__btn {
  flex: 1; padding: 5px 4px; border-radius: 6px; cursor: pointer;
  border: 2px solid #8a6a40; background: rgba(255, 248, 225, 0.6);
  font-family: var(--font-head); font-size: 12px; color: var(--ink);
}
.cq-teampick__btn.is-on { background: linear-gradient(#ffe39a, #c99a2e); border-color: #7a5208; box-shadow: 0 0 8px rgba(233, 196, 106, 0.8); }

/* siege button + target menu */
.cq-siege-wrap { position: relative; }
.cq-btn--blood {
  color: #ffe3c8;
  background: linear-gradient(#b8463a, #8e1f17 55%, #5a0f0a);
  border: 2px solid #3a0a06;
  box-shadow: inset 0 1px 0 rgba(255, 200, 160, 0.3), 0 4px 0 #3a0a06, 0 6px 14px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 1px #000;
  animation: cq-blood 1.6s ease-in-out infinite;
}
@keyframes cq-blood { 50% { box-shadow: inset 0 1px 0 rgba(255, 200, 160, 0.3), 0 4px 0 #3a0a06, 0 0 22px rgba(255, 80, 60, 0.8); } }
.cq-siege-menu { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; padding: 10px; min-width: 200px; }
.cq-siege-menu .cq-btn { border-left: 6px solid var(--c); font-size: 15px; padding: 8px 12px; }

/* ── skills scroll ─────────────────────────────── */

.cq-skills { width: min(94vw, 560px); text-align: left; }
.cq-skills .cq-title { text-align: center; }
.cq-skills__intro { text-align: center; font-size: 16px; }
.cq-skills__timer { position: absolute; top: 12px; right: 44px; font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink-soft); }
.cq-skills__timer.is-low { color: var(--blood); animation: cq-pulse-text 0.8s ease-in-out infinite; }
@keyframes cq-pulse-text { 50% { opacity: 0.4; } }
.cq-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.cq-preset {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px; border-radius: 8px; cursor: pointer;
  border: 2px solid #8a6a40; background: rgba(255, 248, 225, 0.55);
  font-family: var(--font-head); color: var(--ink);
  transition: transform 0.12s, box-shadow 0.12s;
}
.cq-preset span { font-size: 24px; }
.cq-preset b { font-size: 13px; }
.cq-preset small { font-family: var(--font-body); font-style: italic; font-size: 12px; color: var(--ink-soft); }
.cq-preset:hover { transform: translateY(-2px); }
.cq-preset.is-on { border-color: var(--gold-deep); box-shadow: 0 0 0 3px var(--gold), 0 0 16px rgba(233, 196, 106, 0.7); background: rgba(255, 240, 200, 0.9); }
.cq-skillrows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.cq-skill {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(122, 82, 48, 0.12); border: 1px solid rgba(122, 82, 48, 0.35);
}
.cq-skill__icon { font-size: 26px; text-align: center; }
.cq-skill__text { display: flex; flex-direction: column; line-height: 1.2; }
.cq-skill__text b { font-family: var(--font-head); font-size: 15px; }
.cq-skill__text span { font-size: 13px; font-style: italic; color: var(--ink-soft); }
.cq-skill__text small { font-size: 12.5px; margin-top: 2px; }
.cq-skill__ctl { display: flex; align-items: center; gap: 6px; }
.cq-skill__ctl button {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 2px solid #7a5230; background: linear-gradient(#ffe39a, #e9b949 45%, #b8862b);
  font-family: var(--font-head); font-weight: 900; font-size: 18px; color: #3b2005;
}
.cq-skill__ctl button:disabled { filter: grayscale(0.8); opacity: 0.45; cursor: not-allowed; }
.cq-pips { display: flex; gap: 4px; }
.cq-pips i { width: 12px; height: 18px; border-radius: 3px; background: rgba(0, 0, 0, 0.15); border: 1px solid #7a5230; }
.cq-pips i.on { background: linear-gradient(#ffe39a, #c99a2e); box-shadow: 0 0 6px rgba(233, 196, 106, 0.9); }
.cq-readylist { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.cq-ready { font-family: var(--font-head); font-size: 13px; padding: 4px 10px; border-radius: 12px; border: 2px solid var(--c); background: rgba(255, 248, 225, 0.6); opacity: 0.6; }
.cq-ready.is-ready { opacity: 1; background: rgba(125, 255, 154, 0.25); }

/* ── HUD die (movement d6) ─────────────────────── */

.cq-rolldie {
  position: fixed; z-index: 32;
  left: 50%; bottom: calc(26px + var(--safe-bottom));
  transform: translateX(calc(-50% - 290px));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  animation: cq-rd-in 0.3s ease-out;
}
.cq-rolldie.is-out { animation: cq-rd-out 0.35s ease-in forwards; }
@keyframes cq-rd-in { from { opacity: 0; } }
@keyframes cq-rd-out { to { opacity: 0; } }
.cq-rolldie__cube {
  width: 96px; height: 96px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fffaf0, #e6d2a8);
  border: 3px solid #7a5230;
  box-shadow:
    inset 0 -8px 0 rgba(122, 82, 48, 0.25), inset 0 3px 0 rgba(255, 255, 255, 0.8),
    0 0 0 4px var(--c, #e9c46a), 0 14px 30px rgba(0, 0, 0, 0.55);
  display: grid; place-items: center;
}
.cq-rolldie.is-spinning .cq-rolldie__cube { animation: cq-die-spin 0.95s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.cq-rolldie.is-done .cq-rolldie__cube { animation: cq-die-land 0.5s ease-out; box-shadow: inset 0 -8px 0 rgba(122, 82, 48, 0.25), inset 0 3px 0 rgba(255, 255, 255, 0.8), 0 0 0 4px var(--c, #e9c46a), 0 0 36px rgba(255, 220, 120, 0.9), 0 14px 30px rgba(0, 0, 0, 0.55); }
@keyframes cq-die-spin {
  0% { transform: rotate(-540deg) scale(0.6); }
  60% { transform: rotate(-80deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}
@keyframes cq-die-land { 0% { transform: scale(1.25); } 50% { transform: scale(0.94); } 100% { transform: scale(1); } }
.cq-face { width: 72px; height: 72px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; }
.cq-face i { border-radius: 50%; background: transparent; }
.cq-face i.on { background: radial-gradient(circle at 35% 30%, #5a3a1e, #2e1c0e 70%); box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35), 0 1px 1px rgba(0, 0, 0, 0.5); }
.cq-rolldie__label {
  padding: 5px 16px;
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: #fff4d6; text-shadow: 0 1px 3px #000, 0 0 10px #000;
  background: rgba(30, 18, 8, 0.75); border: 1px solid rgba(233, 196, 106, 0.5); border-radius: 14px;
  white-space: nowrap;
}
.cq-rolldie__label b { font-size: 22px; color: var(--gold); }
.cq-rolldie__label small { font-weight: 400; font-style: italic; opacity: 0.8; }

/* ── duel scroll ───────────────────────────────── */

.cq-duel {
  position: fixed; z-index: 33;
  top: calc(150px + var(--safe-top)); left: 50%; transform: translateX(-50%);
  width: min(94vw, 640px);
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px 12px;
  padding: 14px 18px 12px;
  background: url('../img/conquista/parchment.jpg') center / 300px, #ecd7a6;
  border-top: 4px solid #7a5230; border-bottom: 4px solid #7a5230;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  color: var(--ink);
  animation: cq-unroll 0.45s ease-out;
  pointer-events: none;
}
.cq-duel.is-out { animation: cq-roll-up 0.4s ease-in forwards; }
@keyframes cq-roll-up { to { transform: translateX(-50%) scaleY(0.1); opacity: 0; } }
.cq-duel__side { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px; border-radius: 8px; border: 2px solid var(--c); background: rgba(255, 248, 225, 0.45); transition: box-shadow 0.3s, opacity 0.3s; }
.cq-duel__side.is-me { background: rgba(255, 240, 200, 0.75); }
.cq-duel__side.is-win { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(233, 196, 106, 0.9); }
.cq-duel__side.is-lose { opacity: 0.7; }
.cq-duel__role { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--d); }
.cq-duel__who { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.cq-duel__emblem { font-size: 26px; }
.cq-duel__who b { font-family: var(--font-head); font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-duel__who small { font-size: 12px; font-style: italic; color: var(--ink-soft); }
.cq-hp { position: relative; width: 100%; height: 16px; border-radius: 4px; overflow: hidden; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(233, 196, 106, 0.6); font-family: var(--font-head); font-size: 11px; color: #fff; text-align: center; line-height: 14px; }
.cq-hp i { position: absolute; inset: 0; width: 100%; background: var(--c); transition: width 0.6s; }
.cq-hp span { position: relative; text-shadow: 0 1px 2px #000; }
.cq-duel__die { margin-top: 4px; }
.cq-d20 {
  display: inline-grid; place-items: center; width: 54px; height: 54px;
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: linear-gradient(160deg, #fff6d6, #d9b27c);
  font-family: var(--font-head); font-weight: 900; font-size: 24px; color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--c);
}
.cq-d10 {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: linear-gradient(160deg, #ffd3c4, #c0392b);
  font-family: var(--font-head); font-weight: 900; font-size: 16px; color: #fff; text-shadow: 0 1px 2px #000;
  vertical-align: middle;
}
.cq-duel__parts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 20px; }
.cq-chip { font-family: var(--font-head); font-size: 11px; padding: 2px 7px; border-radius: 10px; background: rgba(46, 139, 87, 0.2); border: 1px solid rgba(46, 139, 87, 0.6); color: #14432a; white-space: nowrap; }
.cq-chip--bad { background: rgba(192, 57, 43, 0.15); border-color: rgba(192, 57, 43, 0.6); color: #6e1a12; }
.cq-duel__total { font-family: var(--font-head); font-size: 15px; min-height: 1.2em; }
.cq-duel__total b { font-size: 22px; color: var(--blood); }
.cq-duel__vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.cq-duel__vs span { font-size: 34px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
.cq-duel__vs small { font-family: var(--font-head); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.cq-duel__vs em { font-size: 11px; color: var(--ink-soft); max-width: 90px; }
.cq-duel__result { grid-column: 1 / -1; text-align: center; display: flex; flex-direction: column; gap: 4px; min-height: 1.2em; }
.cq-duel__verdict { font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--blood); animation: cq-toast-in 0.3s ease-out; }
.cq-duel__verdict small { font-weight: 400; font-size: 12px; color: var(--ink-soft); }
.cq-duel__dmg { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 15px; animation: cq-toast-in 0.3s ease-out; }
.cq-duel__dmg b { font-family: var(--font-head); font-size: 18px; color: var(--blood); }
.cq-duel__ko { font-family: var(--font-title); font-weight: 900; font-size: 20px; color: var(--blood); animation: cq-count 0.6s ease-out; }

/* ── siege calls ───────────────────────────────── */

.cq-sieges {
  position: fixed; z-index: 34;
  right: 12px; bottom: calc(80px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 10px;
  width: min(80vw, 300px);
}
.cq-siege {
  padding: 10px 12px; border-radius: 6px;
  background: url('../img/conquista/parchment.jpg') center / 300px, #ecd7a6;
  border: 2px solid #7a5230; border-left: 8px solid var(--c);
  box-shadow: inset 0 0 18px rgba(122, 82, 48, 0.4), 0 10px 20px rgba(0, 0, 0, 0.45);
  color: var(--ink); font-size: 13.5px; line-height: 1.3;
  animation: cq-sticky-in 0.5s ease-out;
}
.cq-siege--defence { border-color: #8e1f17; }
.cq-siege__head { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--blood); }
.cq-siege__meta { font-size: 12.5px; color: var(--ink-soft); margin: 3px 0 6px; }
.cq-siege__knights { display: flex; flex-direction: column; gap: 5px; }
.cq-siege__k {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 6px; cursor: pointer;
  border: 2px solid #8a6a40; background: rgba(255, 248, 225, 0.5);
  font-family: var(--font-head); font-size: 13px; color: var(--ink); text-align: left;
}
.cq-siege__k small { font-family: var(--font-body); font-style: italic; color: var(--ink-soft); }
.cq-siege__k b { font-size: 12px; color: var(--ink-soft); }
.cq-siege__k.is-in { border-color: #8e1f17; background: rgba(192, 57, 43, 0.14); }
.cq-siege__k.is-in b { color: var(--blood); }
.cq-siege--defence .cq-siege__k.is-in { border-color: #2e6b3a; background: rgba(46, 139, 87, 0.16); }
.cq-siege--defence .cq-siege__k.is-in b { color: #14432a; }
.cq-siege__hint { display: block; margin-top: 6px; font-size: 12px; font-style: italic; color: var(--ink-soft); }

/* stunned knight: counter-attack card */
.cq-siege--stun { border-color: #6a4a8e; animation: cq-sticky-in 0.5s ease-out, cq-stun-pulse 1.6s ease-in-out 2; }
.cq-siege--stun .cq-siege__head { color: #4b2f6b; }
.cq-counter__k { border-color: var(--t, #8a6a40); background: rgba(255, 248, 225, 0.6); }
.cq-counter__k:hover { background: rgba(192, 57, 43, 0.14); }
.cq-counter__k b { color: var(--blood); }
.cq-counter__k.is-in { border-color: #2e5f8e; background: rgba(46, 95, 142, 0.12); }
.cq-counter__k.is-in b { color: #1f3f63; }
@keyframes cq-stun-pulse { 0%, 100% { box-shadow: inset 0 0 18px rgba(122, 82, 48, 0.4), 0 10px 20px rgba(0, 0, 0, 0.45); } 50% { box-shadow: inset 0 0 18px rgba(122, 82, 48, 0.4), 0 0 0 6px rgba(106, 74, 142, 0.35), 0 10px 20px rgba(0, 0, 0, 0.45); } }

/* ── the Consigliere (guide) ───────────────────── */

.cq-sticky--guide { border-color: #2e5f8e; padding-right: 16px; }
.cq-sticky--guide .cq-sticky__seal { background: radial-gradient(circle at 35% 30%, #6aa5d8, #2e5f8e 60%, #15294a); }
.cq-guide__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.cq-guide__head b { margin: 0; color: #1e4a73; }
.cq-guide__icon { font-size: 22px; }
.cq-guide__actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.cq-guide__actions .cq-btn { font-size: 13px; padding: 6px 14px; }
.cq-sticky--guide .cq-link { font-size: 12px; color: var(--ink-soft); background: none; border: 0; cursor: pointer; font-family: var(--font-body); font-style: italic; }
.cq-audio .cq-link { background: none; border: 0; cursor: pointer; font-family: var(--font-body); font-style: italic; font-size: 13px; color: var(--ink-soft); text-decoration: underline; }

/* ── rules sections ────────────────────────────── */

.cq-rules__lead { font-size: 16px; text-align: center; font-style: italic; }
.cq-rules__h { margin: 12px 0 4px; font-family: var(--font-head); font-size: 16px; color: var(--blood); border-bottom: 1px dashed rgba(122, 82, 48, 0.5); padding-bottom: 2px; }
.cq-rules__list li { font-size: 15.5px; }
.cq-rules__list li > span { font-size: 22px; font-family: var(--font-head); font-weight: 900; color: var(--gold-deep); }

/* ── responsive ────────────────────────────────── */

@media (max-width: 760px) {
  body { font-size: 15px; }
  .cq-hide-sm { display: none; }
  .cq-houses { grid-template-columns: repeat(2, 1fr); }
  .cq-house { min-height: 0; }
  .cq-house__banner { height: 70px; font-size: 32px; }
  .cq-settings { grid-template-columns: 1fr 1fr; }
  .cq-players { width: auto; top: calc(136px + var(--safe-top)); left: 8px; right: 8px; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; }
  .cq-pl { grid-template-columns: 24px auto; padding: 3px 7px 3px 3px; gap: 5px; border-width: 1px; border-left-width: 4px; width: 46%; }
  .cq-pl.is-turn { transform: translateY(2px); }
  .cq-pl__emblem { width: 24px; height: 28px; font-size: 14px; }
  .cq-pl__name { font-size: 11px; max-width: 64px; }
  .cq-pl__relics { font-size: 11px; letter-spacing: 0; }
  .cq-pl__camp { height: 13px; font-size: 9px; line-height: 11px; }
  .cq-pl__pawns { gap: 2px; }
  .cq-mini { height: 7px; }
  .cq-pl__sub { display: none; }
  .cq-scroll { font-size: 15px; padding: 7px 26px; min-width: 0; white-space: nowrap; }
  .cq-scroll__emblem { font-size: 20px; }
  .cq-round { top: calc(112px + var(--safe-top)); font-size: 12px; }
  .cq-stickies { top: auto; left: 8px; right: auto; bottom: calc(150px + var(--safe-bottom)); width: min(62vw, 220px); gap: 8px; }
  .cq-sticky { padding: 7px 24px 7px 10px; font-size: 12.5px; }
  .cq-sticky__seal { width: 30px; height: 30px; font-size: 14px; right: -8px; bottom: -8px; }
  /* the pulsing roll button and the scroll banner already say it is your turn */
  .cq-sticky--turn { display: none; }
  .cq-sticky--guide { font-size: 12px; }
  .cq-btn--die { font-size: 18px; padding: 12px 20px; }
  .cq-actionbar { left: 8px; right: 62px; width: auto; transform: none; }
  .cq-actionbar__row { flex-wrap: wrap; justify-content: center; }
  .cq-hint { font-size: 14px; padding: 4px 8px; }
  .cq-countdown span { font-size: 110px; }
  .cq-rolldie { bottom: auto; top: calc(150px + var(--safe-top)); transform: translateX(-50%); }
  .cq-rolldie__cube { width: 72px; height: 72px; border-radius: 14px; }
  .cq-face { width: 54px; height: 54px; gap: 3px; }
  .cq-rolldie__label { font-size: 13px; }
  .cq-duel { top: calc(200px + var(--safe-top)); gap: 6px; padding: 10px; grid-template-columns: 1fr auto 1fr; }
  .cq-duel__emblem { font-size: 20px; }
  .cq-d20 { width: 42px; height: 42px; font-size: 19px; }
  .cq-duel__vs span { font-size: 24px; }
  .cq-duel__vs em { display: none; }
  .cq-sieges { right: 8px; bottom: calc(136px + var(--safe-bottom)); width: min(60vw, 240px); }
  .cq-siege { font-size: 12px; padding: 8px; }
  .cq-presets { grid-template-columns: 1fr; }
  .cq-skill { grid-template-columns: 30px 1fr auto; gap: 6px; }
  .cq-skill__text small { display: none; }
}
