:root{
  --bg:#04050a;
  --panel: rgba(255,255,255,.045);
  --line2: rgba(255,255,255,.06);
  --text:#eaf0ff;
  --muted: rgba(234,240,255,.62);

  --gold1: rgba(255,214,120,.92);
  --cyan:#4dd7ff;
  --warn:#ffb020;

  --shadow: 0 20px 70px rgba(0,0,0,.70);
  --shadow2: 0 10px 30px rgba(0,0,0,.55);

  --r20:20px;

  /* ✅ ancho del chat fijo */
  --chatW: 380px;
  --chatGap: 16px; /* separación entre main y chat */

  /* ✅ NUEVO: ancho del mercado fijo */
  --marketW: 360px;
  --marketGap: 16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1400px 650px at 10% -10%, rgba(77,215,255,.11), transparent 60%),
    radial-gradient(1200px 700px at 95% 10%, rgba(255,59,59,.10), transparent 58%),
    radial-gradient(900px 500px at 50% 115%, rgba(44,255,138,.08), transparent 62%),
    radial-gradient(900px 500px at 50% 40%, rgba(255,176,32,.06), transparent 58%),
    var(--bg);
  overflow-x:hidden;
}

.hidden{ display:none !important; }
.muted{ opacity:.72; color: var(--muted); }
.small{ font-size:12px; opacity:.8; margin:0; }
.error{ color:#ff8a8a; }

/* ✅ MAIN: deja espacio al chat fijo */
.container{
  max-width: 1120px;
  margin: 26px auto;
  padding: 16px;
}
.withFixedChat{
  margin-right: calc(var(--chatW) + var(--chatGap));
}

/* ✅ NUEVO: deja espacio al mercado fijo a la izquierda */
.withFixedMarket{
  margin-left: calc(var(--marketW) + var(--marketGap));
}

/* ✅ Chat fijo a la derecha, siempre visible */
.fixedChat{
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: var(--chatW);
  z-index: 90;
  pointer-events: auto;
}
.chatPanelFixed{
  height: 100%;
  display:flex;
  flex-direction:column;
  padding: 14px;
  border-radius: var(--r20);
}

/* ✅ NUEVO: Mercado fijo a la izquierda, siempre visible */
.fixedMarket{
  position: fixed;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: var(--marketW);
  z-index: 90;
  pointer-events: auto;
}
.marketPanelFixed{
  height: 100%;
  display:flex;
  flex-direction:column;
  padding: 14px;
  border-radius: var(--r20);
}

.card, .panel{
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: var(--r20);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.card{
  padding: 16px;
  margin-bottom: 14px;
}

/* header */
.pageHead{
  padding: 46px 14px 14px;
  margin-bottom: 14px;
  border-radius: var(--r20);
  border: 1px solid var(--line2);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.20));
  box-shadow: var(--shadow2);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: visible;
}
.title{
  margin:0;
  text-align:center;
  letter-spacing: 1.2px;
  font-weight: 950;
  font-size: 44px;
  line-height: 1.05;
  position: relative;
  text-shadow:
    0 18px 55px rgba(0,0,0,.9),
    0 0 30px rgba(255,176,32,.12),
    0 0 24px rgba(77,215,255,.12);
}
.title::before{
  content:"👑";
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -42px;
  font-size: 28px;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.6));
  opacity: .98;
  pointer-events:none;
}
.tagline{
  margin: 10px 0 0;
  text-align:center;
  font-size: 14px;
  letter-spacing:.25px;
}

.howBar{
  display:flex;
  justify-content:center;
  margin-top: 12px;
}
.howBtn{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 14px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
  color: var(--text);
  cursor:pointer;
  font-weight: 850;
  letter-spacing:.25px;
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
  transition: transform .08s ease, background .15s ease;
}
.howBtn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.05); }
.howBtn:active{ transform: translateY(1px) scale(.99); }
.howBtnHint{ font-size: 11px; }

/* inputs/buttons */
input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  color: var(--text);
  outline: none;
}
input::placeholder{ color: rgba(234,240,255,.55); }
input:focus{
  border-color: rgba(77,215,255,.35);
  box-shadow: 0 0 0 4px rgba(77,215,255,.10);
}

button{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text);
  font-weight: 900;
  letter-spacing:.35px;
  padding: 12px 14px;
  cursor:pointer;
  transition: transform .06s ease, background .15s ease, border .15s ease, filter .15s ease;
  user-select:none;
}
button:hover{ transform: translateY(-1px); background: rgba(255,255,255,.08); }
button:active{ transform: translateY(1px) scale(.99); }
button:disabled{ opacity:.45; cursor:not-allowed; transform:none; }

.primaryBtn{
  border-color: rgba(255,176,32,.25);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,214,120,.14), transparent 40%),
    linear-gradient(180deg, rgba(255,176,32,.16), rgba(0,0,0,.15));
  box-shadow:
    0 18px 40px rgba(0,0,0,.55),
    0 0 26px rgba(255,176,32,.12);
}
.neutral{ background: rgba(0,0,0,.22); }

.panelHead{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:10px;
  margin-bottom: 10px;
}
.panelTitle{
  font-weight: 900;
  letter-spacing:.35px;
  font-size: 14px;
  opacity:.95;
}
.panelBadge{
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  letter-spacing:.35px;
  font-variant-numeric: tabular-nums;
}

.bannerClean{
  margin-top: 10px;
  font-weight: 900;
  letter-spacing:.45px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
}
.royalBanner{ margin-top: 0; }

/* ✅ FIX: REY ACTUAL visible + corona no tapa */
.royalHero{ margin-bottom: 14px; display:flex; flex-direction:column; gap: 12px; }
.royalTop{ display:flex; gap: 12px; align-items: stretch; }
.royalLeft, .royalRight{
  flex:1;
  padding: 16px;
  border-radius: var(--r20);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.20);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
  position: relative;
  overflow: visible;
}
.royalKicker{
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 1px;
  color: rgba(255,214,120,.95);
  text-shadow: 0 0 14px rgba(255,176,32,.12);
  margin-bottom: 10px;
  position: relative;
  z-index: 3;
}
.kingHeroName{
  display:inline-block;
  font-size: 40px;
  letter-spacing: 1px;
  font-weight: 1000;
  padding: 14px 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,214,120,.22), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.22));
  border: 1px solid rgba(255,214,120,.20);
  box-shadow:
    0 22px 70px rgba(0,0,0,.75),
    0 0 44px rgba(255,176,32,.14),
    inset 0 0 0 1px rgba(0,0,0,.25);
  text-shadow:
    0 0 20px rgba(255,176,32,.22),
    0 0 24px rgba(77,215,255,.12);
  position: relative;
  z-index: 2;
  margin-top: 2px;
  padding-top: 18px; /* evita que cualquier adorno se monte encima del kicker */
}
.kingHeroName::after{
  /* corona a un costado, NO arriba */
  content:"👑";
  position:absolute;
  right: -12px;
  top: -14px;
  font-size: 22px;
  opacity:.95;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.65));
  pointer-events:none;
  transform: rotate(12deg);
}
.royalMeta{ margin-top: 12px; display:flex; gap:10px; flex-wrap:wrap; }
.royalChip{
  flex:1;
  min-width: 170px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.royalVal{
  margin-top: 4px;
  font-weight: 1000;
  letter-spacing:.35px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 980px){
  .royalTop{ flex-direction:column; }
}

/* decree */
.megaDecree{
  padding: 0;
  border: 1px solid rgba(255,214,120,.14);
  background:
    radial-gradient(1000px 380px at 50% 0%, rgba(255,176,32,.11), transparent 60%),
    radial-gradient(1000px 380px at 50% 100%, rgba(77,215,255,.09), transparent 60%),
    rgba(255,255,255,.045);
  box-shadow: var(--shadow);
}
.decreeHead{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px;
}
.decreeIcon{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,214,120,.25), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.22));
  border: 1px solid rgba(255,214,120,.16);
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
  position: relative;
}
.decreeIcon::after{
  content:"✶";
  position:absolute; inset:0;
  display:grid; place-items:center;
  font-weight: 950;
  opacity:.95;
  color: rgba(255,214,120,.9);
  text-shadow: 0 0 18px rgba(255,176,32,.25);
}
.decreeSeal{
  width: 44px; height: 44px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 40% 35%, rgba(255,214,120,.35), rgba(255,214,120,.08) 55%, rgba(0,0,0,.25) 70%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.25));
  border: 1px solid rgba(255,214,120,.18);
  box-shadow:
    0 18px 40px rgba(0,0,0,.65),
    0 0 24px rgba(255,176,32,.12);
  position: relative;
}
.decreeSeal::after{
  content:"SEAL";
  position:absolute; inset:0;
  display:grid; place-items:center;
  font-size: 10px;
  letter-spacing: 1.2px;
  opacity:.85;
  color: rgba(255,214,120,.85);
}
.decreeKicker{
  font-weight: 1000;
  letter-spacing: .9px;
  font-size: 12px;
  color: rgba(255,214,120,.95);
  text-shadow: 0 0 22px rgba(255,176,32,.14);
}
.decreeSub{ font-size: 12px; margin-top: 3px; }
.decreeBody{ padding: 8px 14px 16px; }
.decreeCrownLine{
  display:flex;
  align-items:center;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 10px;
}
.decreeCrownLeft, .decreeCrownRight{
  width: 28%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,214,120,.22), transparent);
}
.decreeCrownMid{
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 1px;
  opacity:.85;
}
.decreeText{
  margin: 0;
  padding: 22px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,214,120,.18);
  background:
    radial-gradient(circle at 35% 25%, rgba(255,214,120,.10), transparent 60%),
    radial-gradient(circle at 65% 80%, rgba(77,215,255,.08), transparent 62%),
    rgba(0,0,0,.26);
  line-height: 1.18;
  font-size: 30px;
  font-weight: 1000;
  letter-spacing: .45px;
  text-shadow:
    0 18px 70px rgba(0,0,0,.90),
    0 0 34px rgba(255,176,32,.14);
  overflow-wrap: anywhere;
}
.decreeFooter{
  margin-top: 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px 0;
}
.decreeStamp{
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,214,120,.16);
  background: rgba(0,0,0,.22);
}
.stampTop{
  font-weight: 1000;
  letter-spacing:.55px;
  font-size: 12px;
  color: rgba(255,214,120,.92);
}
.stampBottom{ margin-top: 2px; font-size: 12px; }
.decreeSignature{
  font-size: 12px;
  letter-spacing:.35px;
  text-align:right;
  opacity:.85;
}

.divider.soft{ height:1px; background: rgba(255,255,255,.06); margin: 10px 0; }
.stackTight{ display:flex; flex-direction:column; gap:10px; padding: 0 14px 14px; }

/* dashboard sin chat */
.dashNoChat{
  display:grid;
  grid-template-columns: 1.65fr .95fr;
  gap: 14px;
  align-items:start;
}
.dashMain{ display:flex; flex-direction:column; gap: 14px; }
.dashSide{ display:flex; flex-direction:column; gap: 14px; }
@media (max-width: 980px){
  .dashNoChat{ grid-template-columns: 1fr; }
}

/* stability */
.stabWrap{
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(0,0,0,.26);
}
.stabTop{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.stabLabel{ font-weight: 950; letter-spacing:.55px; font-size: 12px; }
.stabValue{ color: var(--cyan); font-weight: 950; }
.bar{
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.08);
  position: relative;
}
.bar > .fill{
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, rgba(44,255,138,.95), rgba(77,215,255,.95));
  box-shadow: 0 0 22px rgba(77,215,255,.22);
  transition: width .18s ease;
}
.bar > .pulse{
  position:absolute;
  inset:-40px -40px -40px -40px;
  background: radial-gradient(circle, rgba(77,215,255,.16), transparent 55%);
  animation: drift 2.6s linear infinite;
  pointer-events:none;
  mix-blend-mode: screen;
}
@keyframes drift { 0%{ transform: translateX(-12%);} 100%{ transform: translateX(12%);} }

/* actions */
.buttons{ display:flex; gap: 10px; }
.buttons button{ width: 50%; }
.support{
  border-color: rgba(44,255,138,.25);
  background:
    radial-gradient(circle at 30% 20%, rgba(44,255,138,.18), transparent 45%),
    linear-gradient(180deg, rgba(44,255,138,.10), rgba(0,0,0,.16));
}
.betray{
  border-color: rgba(255,59,59,.25);
  background:
    radial-gradient(circle at 30% 20%, rgba(255,59,59,.20), transparent 45%),
    linear-gradient(180deg, rgba(255,59,59,.10), rgba(0,0,0,.16));
}
.statusWrap{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.22);
}
.statusTitle{ font-size: 12px; font-weight: 1000; letter-spacing:.35px; }
.statusLine{ margin: 6px 0 0; min-height: 18px; font-weight: 900; }

/* history */
.historyTitle{ font-weight: 850; font-size: 12px; letter-spacing:.25px; margin-bottom: 8px; }
.historyList{
  display:flex;
  flex-direction:column;
  gap: 8px;
  max-height: 260px;
  overflow:auto;
  padding-right: 6px;
}
.histRow{
  display:flex;
  justify-content: space-between;
  gap:10px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
}
.histLeft{ display:flex; align-items:center; gap:10px; min-width:0; }
.rank{ font-weight: 1000; opacity:.92; }
.king{
  font-weight: 950;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.killer{
  font-size: 12px;
  opacity:.75;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.histRight{ font-variant-numeric: tabular-nums; white-space: nowrap; opacity:.85; }

/* ✅ Council inside fixed chat */
.councilBox{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,214,120,.14);
  background:
    radial-gradient(circle at 25% 15%, rgba(255,214,120,.10), transparent 60%),
    rgba(0,0,0,.22);
  margin-bottom: 10px;
}
.councilHead{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:10px;
}
.councilTitle{
  font-weight: 1000;
  letter-spacing:.55px;
  color: rgba(255,214,120,.92);
}
.councilBadge{
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
}
.councilText{
  margin: 8px 0 0;
  line-height: 1.35;
  font-size: 12.5px;
}

.feedHint{ font-size: 12px; margin: 2px 0 10px; }

/* ✅ Chat fixed list scroll */
.chatListFixed{
  flex: 1;
  overflow:auto;
  padding-right: 6px;
  border-radius: 14px;
}
.feedItem{
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.22);
  line-height: 1.25;
  font-size: 12.5px;
  margin-bottom: 8px;
}
.feedItem strong{ color: rgba(255,214,120,.92); }

.chatComposerFixed{
  display:flex;
  gap: 10px;
  margin-top: 10px;
}
.chatComposerFixed input{ flex:1; }
.chatComposerFixed button{ width: 120px; }

/* ✅ LIVE badge upgrades (EN VIVO / ASEDIO) */
.liveBadge{
  border-color: rgba(255,255,255,.14);
  background: rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  gap: 8px;
}
.liveDot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,59,59,.95);
  box-shadow: 0 0 18px rgba(255,59,59,.35);
  opacity: .2;
  transition: opacity .15s ease, background .15s ease, box-shadow .15s ease;
}
body.liveOn .liveDot{
  opacity: 1;
  animation: liveBlink .9s ease-in-out infinite;
}
@keyframes liveBlink{
  0%,100%{ transform: scale(1); opacity: .85; }
  50%{ transform: scale(1.35); opacity: 1; }
}

/* ✅ When SIEGE -> warn style */
body.siegeOn #chatLiveBadgePill{
  border-color: rgba(255,176,32,.25);
}
body.siegeOn .liveDot{
  background: rgba(255,176,32,.95);
  box-shadow: 0 0 18px rgba(255,176,32,.35);
}

/* siege bar color */
body.siegeOn .bar > .fill{
  background: linear-gradient(90deg, rgba(255,59,59,.95), rgba(255,176,32,.95));
  box-shadow: 0 0 26px rgba(255,59,59,.28);
}
body.siegeOn .stabValue{ color: var(--warn); }

/* ✅ Responsive: en móvil el chat deja de ser fixed y se vuelve normal abajo */
@media (max-width: 1100px){
  :root{ --chatW: 340px; --marketW: 320px; }
  .withFixedChat{ margin-right: calc(var(--chatW) + var(--chatGap)); }
  .withFixedMarket{ margin-left: calc(var(--marketW) + var(--marketGap)); }
}
@media (max-width: 980px){
  .fixedChat{
    position: static;
    width: auto;
    height: auto;
    margin: 0 16px 16px;
  }
  .fixedMarket{
    position: static;
    width: auto;
    height: auto;
    margin: 16px 16px 16px;
  }
  .chatPanelFixed{ height: auto; }
  .marketPanelFixed{ height: auto; }
  .withFixedChat{ margin-right: 0; }
  .withFixedMarket{ margin-left: 0; }
}

/* MODAL (igual que antes, mínimo necesario) */
.modalOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  display:grid;
  place-items:center;
  z-index: 9998;
  padding: 18px;
}
.modalCard{
  width: min(760px, 96vw);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(900px 300px at 50% 0%, rgba(255,176,32,.10), transparent 60%),
    rgba(0,0,0,.55);
  box-shadow: 0 28px 90px rgba(0,0,0,.85);
  backdrop-filter: blur(14px);
  overflow:hidden;

  /* ✅ FIX MODAL: que NO se corte el botón en pantallas pequeñas */
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.modalHead{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.modalSigil{
  width: 38px; height:38px;
  border-radius: 12px;
  border: 1px solid rgba(255,214,120,.16);
  background: rgba(255,255,255,.05);
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
  position: relative;
}
.modalSigil::after{
  content:"✶";
  position:absolute; inset:0;
  display:grid; place-items:center;
  font-weight: 950;
  color: rgba(255,214,120,.92);
  text-shadow: 0 0 20px rgba(255,176,32,.18);
}
.modalTitles{ flex:1; }
.modalTitle{ font-weight: 1000; letter-spacing:.35px; }
.modalSub{ font-size: 12px; margin-top: 2px; }
.modalClose{
  width: 40px;
  height: 40px;
  padding:0;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.06);
}
.modalBody{
  padding: 14px;

  /* ✅ FIX MODAL: el contenido scrollea adentro del modal */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;

  /* (opcional recomendado) aire abajo */
  padding-bottom: 18px;
}
.howGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 720px){ .howGrid{ grid-template-columns: 1fr; } }
.howStep{
  display:flex;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.howNum{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  font-weight: 1000;
  color: rgba(255,214,120,.92);
  border: 1px solid rgba(255,214,120,.16);
  background: rgba(0,0,0,.28);
}
.howMain{ font-weight: 950; }
.howMini{ font-size: 12px; margin-top: 2px; }
.howTip{
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,176,32,.14);
  background: rgba(255,176,32,.06);
}
.howTipTitle{ font-weight: 1000; letter-spacing:.35px; }
.howTipText{ margin-top: 4px; font-size: 12px; }
.modalFoot{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.08);

  /* ✅ FIX MODAL: el botón siempre visible */
  position: sticky;
  bottom: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  z-index: 2;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* =========================
   LIVE / VIEWERS / IMPACT FX
   ========================= */

/* layout mini meta row (si no existe, no rompe nada) */
.chatMeta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

/* ✅ Unificación: liveDot (dejamos la versión final y quitamos duplicado) */
.liveDot{
  width:10px;
  height:10px;
  border-radius:50%;
  background: rgba(255,80,80,.75);
  box-shadow: 0 0 16px rgba(255,80,80,.35);
  position:relative;
  opacity: .2;
  transition: opacity .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
body.liveOn .liveDot{
  opacity: 1;
}
body.liveOn .liveDot::after{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:999px;
  border:1px solid rgba(255,80,80,.25);
  animation: livePulse 1.1s ease-in-out infinite;
}
@keyframes livePulse{
  0%{ transform:scale(.85); opacity:.25;}
  50%{ transform:scale(1); opacity:.60;}
  100%{ transform:scale(1.15); opacity:.0;}
}

/* viewers */
.chatViewers{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  font-variant-numeric: tabular-nums;
}
#viewerCount{
  font-weight:900;
  letter-spacing:.4px;
  text-shadow: 0 0 18px rgba(77,215,255,.20);
}

/* pulse when spike */
body.viewerPulse #viewerCount{
  animation: viewerHit .35s ease;
}
@keyframes viewerHit{
  0%{ transform:scale(1); filter:brightness(1); }
  40%{ transform:scale(1.18); filter:brightness(1.25); }
  100%{ transform:scale(1); filter:brightness(1); }
}

/* betray / support / fall flashes */
body.betrayFlash{
  animation: flashRed .22s ease;
}
@keyframes flashRed{
  0%{ filter:none; }
  100%{ filter: drop-shadow(0 0 18px rgba(255,60,60,.18)); }
}

body.supportFlash{
  animation: flashGreen .22s ease;
}
@keyframes flashGreen{
  0%{ filter:none; }
  100%{ filter: drop-shadow(0 0 18px rgba(44,255,138,.16)); }
}

body.fallFlash{
  animation: fallBoom .52s ease;
}
@keyframes fallBoom{
  0%{ filter:none; }
  35%{ filter: drop-shadow(0 0 26px rgba(255,60,60,.22)); }
  100%{ filter:none; }
}

/* global shakes */
html.shakeLight{
  animation: shakeLight .26s ease;
}
@keyframes shakeLight{
  0%{ transform: translate3d(0,0,0); }
  20%{ transform: translate3d(-2px, 1px, 0); }
  45%{ transform: translate3d(2px, -1px, 0); }
  70%{ transform: translate3d(-1px, -2px, 0); }
  100%{ transform: translate3d(0,0,0); }
}

html.shakeHeavy{
  animation: shakeHeavy .52s ease;
}
@keyframes shakeHeavy{
  0%{ transform: translate3d(0,0,0) rotate(0deg); }
  15%{ transform: translate3d(-6px, 3px, 0) rotate(-.2deg); }
  35%{ transform: translate3d(7px, -4px, 0) rotate(.25deg); }
  55%{ transform: translate3d(-5px, -6px, 0) rotate(-.25deg); }
  75%{ transform: translate3d(6px, 4px, 0) rotate(.2deg); }
  100%{ transform: translate3d(0,0,0) rotate(0deg); }
}

/* =========================
   ✅ NUEVO: MERCADO (UI)
   ========================= */
.marketBalanceRow{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.20);
  margin-bottom: 10px;
}
.marketChips{
  font-weight: 1000;
  letter-spacing:.45px;
  font-variant-numeric: tabular-nums;
  color: rgba(255,214,120,.92);
  text-shadow: 0 0 18px rgba(255,176,32,.14);
}

.marketSection{
  margin-top: 10px;
}
.marketTitle{
  font-weight: 1000;
  letter-spacing:.55px;
  color: rgba(255,214,120,.92);
  margin-bottom: 8px;
}
.marketSub{
  margin-top: 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing:.35px;
}
.marketRow{
  display:flex;
  gap: 10px;
  align-items:center;
}
.marketRow input{ flex:1; }
.marketRow button{ width: 120px; }

.marketBtns{
  display:flex;
  gap: 10px;
}
.marketBtns button{ width: 50%; }

.rumorList{
  margin-top: 10px;
  flex: 1;
  overflow:auto;
  padding-right: 6px;
  border-radius: 14px;
  max-height: 260px;
}

/* =========================
   ✅ NUEVO: POPUP GLOBAL (mensajes grandes)
   ========================= */
.gamePopup{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display:grid;
  place-items:center;
  z-index: 9999;
  padding: 18px;
}
.gamePopupCard{
  width: min(560px, 96vw);
  border-radius: 18px;
  border: 1px solid rgba(255,214,120,.18);
  background:
    radial-gradient(900px 300px at 50% 0%, rgba(255,176,32,.10), transparent 60%),
    rgba(0,0,0,.55);
  box-shadow: 0 28px 90px rgba(0,0,0,.85);
  backdrop-filter: blur(14px);
  padding: 16px;
  text-align:center;
}
.gamePopupText{
  font-size: 16px;
  font-weight: 950;
  letter-spacing:.25px;
  line-height: 1.25;
  margin: 6px 0 14px;
}

/* ✅ siege: brillo extra del mercado y chat */
body.siegeOn .marketPanelFixed,
body.siegeOn .chatPanelFixed{
  box-shadow:
    0 20px 70px rgba(0,0,0,.70),
    0 0 38px rgba(255,176,32,.10);
}