/* Sideral — mesa escura de espaço profundo. As cores de tipo vêm das bordas das
   cartas impressas: azul-marinho (planeta), turquesa (efeito), laranja
   (equipamento) e roxo (evento). Tema único, escuro por escolha. */

:root {
  --void: #05081a;
  --deep: #0a1030;
  --panel: #0f1738;
  --panel-2: #162050;
  --line: #243070;
  --line-2: #33429a;
  --ink: #e8ecfb;
  --muted: #95a0cc;
  --faint: #5d6aa3;
  --planeta: #1f3f8f;
  --efeito: #00efc0;
  --equip: #ff8a00;
  --evento: #8a4dff;
  --turn: #ffcf5c;
  --danger: #ff5c72;
  --ok: #3fe0a0;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--void); }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font: 15px/1.45 var(--body);
  background: var(--void);
}
html:has(.game.orbital),
body:has(.game.orbital) {
  height: 100%;
  overflow: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -8%, #19246a 0%, transparent 62%),
    radial-gradient(900px 540px at -12% 108%, #2b1260 0%, transparent 58%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(1px 1px at 22px 34px, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 148px 86px, #cdd6ff 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 92px 168px, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 206px 214px, #9fb0ff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 60px 250px, #ffe3c4 50%, transparent 52%);
  background-size: 260px 280px;
}
#app { position: relative; z-index: 1; }
#app:has(.game.orbital) { height: 100%; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--turn); outline-offset: 2px; }

/* ---------- tipografia ---------- */
.wordmark {
  margin: 0;
  font: 700 clamp(64px, 12vw, 132px)/.9 var(--display);
  text-transform: uppercase;
  letter-spacing: .22em;
  margin-right: -.22em;
  text-shadow: 0 0 40px rgba(120, 150, 255, .35);
}
.wordmark.sm { font-size: 30px; letter-spacing: .2em; text-shadow: none; }
.title { margin: 0; font: 700 26px/1.05 var(--display); letter-spacing: .01em; text-wrap: balance; }
.eyebrow, .label {
  margin: 0;
  font: 600 12px/1.2 var(--display);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); margin: 0; }
.hint { color: var(--muted); margin: 0; max-width: 60ch; }
.t-planeta { color: #7da2ff; }
.t-efeito { color: var(--efeito); }
.t-equipamento { color: var(--equip); }
.t-evento { color: #b08cff; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 13px/1 var(--body);
  letter-spacing: .01em;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 13px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: #1d2a66; border-color: var(--line-2); }
.btn.primary { background: var(--efeito); color: #032b22; border-color: transparent; }
.btn.primary:hover { background: #5cffdb; }
.btn.ghost { background: transparent; }
.btn.xs { padding: 6px 9px; font-size: 12px; }
.btn.big { padding: 13px 18px; font-size: 15px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.tight { gap: 6px; }

.chip {
  font: 600 11px/1 var(--display);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.chip.turn {
  background: var(--turn);
  color: #2a1d00;
  border-color: transparent;
  animation: turnChip 1.1s ease-in-out infinite;
}
@keyframes turnChip {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 207, 92, .0); filter: brightness(1); }
  50% { box-shadow: 0 0 12px rgba(255, 207, 92, .85); filter: brightness(1.12); }
}
.chip.out { color: var(--danger); border-color: rgba(255, 92, 114, .5); }
.chip.ok { color: var(--ok); border-color: rgba(63, 224, 160, .5); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px rgba(63, 224, 160, .7); }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--turn); }
.conn-online i { background: var(--ok); }
.conn-host-offline i, .conn-offline i, .conn-unsupported i { background: var(--danger); }

/* ---------- cartas ---------- */
.card {
  display: block;
  padding: 0;
  border: 0;
  background: #0b1130;
  border-radius: 7% / 5%;
  overflow: hidden;
  cursor: pointer;
  flex: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
span.card { cursor: default; }
.card img { width: 100%; height: auto; }
button.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
.card.empty { aspect-ratio: 376 / 526; border: 1px dashed var(--line); background: transparent; }

/* ---------- início ---------- */
.home {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 380px);
  align-items: center;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 28px;
}
.home-hero { display: grid; gap: 18px; }
.lede { margin: 0; font-size: 19px; color: #c3cbef; max-width: 36ch; }
.home-card, .lobby-card, .dialog {
  background: rgba(15, 23, 56, .92);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: grid;
  gap: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.field { display: grid; gap: 6px; }
input {
  font: 500 16px var(--body);
  color: var(--ink);
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  width: 100%;
}
input:focus { border-color: var(--efeito); outline: none; }
.code-input { text-transform: uppercase; letter-spacing: .2em; }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

/* ---------- sala de espera ---------- */
.lobby { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.lobby-card { width: min(100%, 460px); }
.lobby-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.room-code { font-size: 44px; letter-spacing: .24em; color: var(--turn); line-height: 1; }
.share { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.share input { font-size: 12px; }
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.roster li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--deep); border-radius: 8px; }
.roster em { font-style: normal; font-size: 12px; color: var(--muted); }

/* ---------- partida: mesa orbital ---------- */
.game.orbital {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "top top" "board rail";
  gap: 8px;
  padding: 8px 10px 10px;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
  padding: 2px 4px 0;
}
.brand { font: 700 20px/1 var(--display); letter-spacing: .24em; text-transform: uppercase; flex: 0 0 auto; }
.turninfo { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.round { color: var(--muted); font-size: 13px; }
.phase { font: 700 20px/1 var(--display); color: var(--turn); }
.roominfo { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex: 0 1 auto; min-width: 0; }
.roominfo .mono { letter-spacing: .16em; color: var(--muted); }

.board {
  grid-area: board;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.board > .dock {
  overflow: hidden;
}
.dock-card.is-active {
  border-color: var(--turn);
  box-shadow:
    0 0 0 2px var(--turn),
    0 0 12px rgba(255, 207, 92, .45),
    0 0 22px rgba(255, 207, 92, .2);
  animation: turnGlowDock 1.1s ease-in-out infinite;
}
@keyframes turnGlowDock {
  0%, 100% {
    border-color: #ffcf5c;
    box-shadow:
      0 0 0 2px rgba(255, 207, 92, .95),
      0 0 10px rgba(255, 207, 92, .35),
      0 0 18px rgba(255, 207, 92, .15);
  }
  50% {
    border-color: #ffe6a0;
    box-shadow:
      0 0 0 3px #ffcf5c,
      0 0 16px rgba(255, 207, 92, .55),
      0 0 28px rgba(255, 207, 92, .25);
  }
}
.orbit {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 55% 45% at 50% 48%, rgba(40, 55, 120, .35), transparent 70%),
    linear-gradient(180deg, rgba(15, 23, 56, .55), rgba(8, 12, 36, .75));
  border: 1px solid var(--line);
  overflow: hidden;
}
.orbit:has(.stage-beat.kind-combat),
.orbit:has(.stage-beat.kind-dice),
.orbit:has(.stage-beat.kind-shuffle),
.orbit:has(.stage-beat.kind-destroy),
.orbit:has(.stage-beat.kind-reveal),
.orbit:has(.spot.decision) {
  overflow: hidden;
  z-index: 4;
}
.orbit-side {
  --side-gap: 6px;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: var(--side-gap);
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 6px;
  z-index: 2;
  box-sizing: border-box;
  overflow: hidden;
}
.orbit-left { padding-right: 6px; }
.orbit-right { padding-left: 6px; }
/* Lado direito: ordem espelhada — infos perto do hub, planeta na borda */
.orbit-right .seat-orbit .seat-body {
  flex-direction: row-reverse;
}
.orbit-side:empty { display: none; }
.orbit:has(.orbit-left:empty) {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
.orbit:has(.orbit-right:empty) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
}
.orbit:has(.orbit-left:empty):has(.orbit-right:empty) {
  grid-template-columns: minmax(0, 1fr);
}
.orbit::before {
  content: "";
  position: absolute;
  inset: 10% 28%;
  border: 1px dashed rgba(93, 106, 163, .28);
  border-radius: 18px;
  pointer-events: none;
  transition: border-color .25s, box-shadow .25s;
  z-index: 0;
}
.orbit.is-aiming::before {
  border-color: rgba(255, 92, 114, .55);
  box-shadow: inset 0 0 40px rgba(255, 92, 114, .08);
}
.orbit.is-aiming .orbit-slot.is-aim-slot {
  overflow: visible;
  z-index: 4;
}
.orbit-slot {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
  container-type: size;
}
.orbit-slot .seat {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}
.hub {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 0;
  background: rgba(10, 16, 48, .92);
  border: 1px solid var(--line-2);
  border-top: 0;
  border-bottom: 0;
  box-shadow: none;
  overflow: hidden;
}
.hub:has(.hub-mid) {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.hub:has(.hub-mid):has(.stage:empty) {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.hub:has(.hub-mid):has(.stage:not(:empty)) {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.hub:has(.stage-beat.kind-combat),
.hub:has(.stage-beat.kind-dice),
.hub:has(.stage-beat.kind-shuffle),
.hub:has(.stage-beat.kind-destroy),
.hub:has(.stage-beat.kind-reveal),
.hub:has(.spot.decision) {
  width: 100%;
  max-height: none;
  padding: 8px 12px;
  z-index: 5;
  overflow: hidden;
}
.hub:has(.stage-beat.kind-combat) .hub-mid,
.hub:has(.stage-beat.kind-dice) .hub-mid,
.hub:has(.stage-beat.kind-shuffle) .hub-mid,
.hub:has(.stage-beat.kind-destroy) .hub-mid,
.hub:has(.stage-beat.kind-reveal) .hub-mid,
.hub:has(.stage-beat.kind-card) .hub-mid {
  display: none;
}
.hub:has(.stage-beat.kind-dice),
.hub:has(.stage-beat.kind-card) {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  padding-top: 8px;
}
.hub .stage:has(.stage-beat.kind-dice),
.hub .stage:has(.stage-beat.kind-card) {
  align-content: start;
  align-self: start;
}
.stage-beat.kind-dice,
.stage-beat.kind-card {
  gap: 6px;
  align-self: start;
}
.stage-beat.kind-dice .eyebrow,
.stage-beat.kind-card .eyebrow {
  margin: 0;
}
.stage-beat.kind-dice .stage-beat-main,
.stage-beat.kind-card .stage-beat-main {
  gap: 12px;
  align-items: flex-start;
}
.stage-beat.kind-dice .stage-beat-text,
.stage-beat.kind-card .stage-beat-text {
  gap: 5px;
}
.stage-beat.kind-dice .title {
  font-size: clamp(18px, 2vw, 24px);
  margin: 0;
}
.hub-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding-top: 2px;
}
.hub-phase {
  margin: 0;
  flex: 0 0 auto;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 207, 92, .28);
  background: rgba(255, 207, 92, .08);
  font: 600 12px/1.2 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--turn);
  text-align: center;
  opacity: .9;
}
.hub-phase.is-turn {
  border-color: transparent;
  background: transparent;
  font-size: 13px;
  opacity: .75;
}
.hub-last-play {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: min(100%, 420px);
  max-height: 100%;
  text-align: center;
  margin: 0 auto;
  flex: 0 1 auto;
  min-height: 0;
}
.hub-last-play.fresh { animation: land .4s ease-out; }
.hub-mid .hub-last {
  width: clamp(96px, 18vh, 148px);
  max-height: min(42%, 200px);
  flex: 0 1 auto;
}
.hub-mid .hub-last img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.hub-last-meta {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  justify-items: center;
}
.hub-last-meta .eyebrow {
  margin: 0;
}
.hub-last-meta .title {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.1;
}
.hub-last-meta .actor {
  margin: 0;
  font-size: 14px;
}
.hub-last-meta .spot-result {
  margin: 4px 0 0;
  font: 600 13px/1.25 var(--display);
  letter-spacing: .02em;
}
.hub-last-meta .spot-result.is-defense { color: var(--efeito); }
.hub-last-meta .spot-result.is-damage { color: #ff8a9a; }
.hub-last-meta .spot-result.is-miss { color: var(--muted); }
.hub-last-meta .spot-result.is-pending { color: var(--turn); }
.hub-last-meta .spot-result.is-ok { color: var(--ok); }
.hub-last-meta .spot-result.is-info { color: #c3cbef; }
.hub .stage {
  min-height: 0;
  max-height: 100%;
  align-content: start;
  overflow: hidden;
}
.hub .stage:empty { display: none; }
.hub .stage .waiting {
  text-align: center;
  margin: 0;
}
.hub-piles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.pile { display: grid; gap: 4px; justify-items: center; width: 64px; }
.pile .card { width: 56px; }
.pile .count { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.2; min-height: 1.2em; }
.pile.dice { width: 72px; }
.pile .card.discard-hit { animation: discardCatch .7s ease-out; }
@keyframes discardCatch {
  0% { transform: scale(.7) translateY(-18px); box-shadow: 0 0 0 0 rgba(0, 239, 192, .5); }
  60% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(0, 239, 192, .15); }
  100% { transform: none; box-shadow: none; }
}

/* Quasar: escolha visual */
.quasar-pick { display: grid; gap: 14px; width: 100%; }
.quasar-target { display: grid; gap: 8px; }
.quasar-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.quasar-card {
  position: relative;
  width: 92px;
  cursor: pointer;
}
.quasar-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--efeito), 0 12px 24px rgba(0, 0, 0, .45); }
.quasar-tag {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 4px 5px;
  border-radius: 6px;
  background: rgba(5, 8, 26, .88);
  color: var(--efeito);
  font: 600 10px/1.1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
}
.quasar-card.is-hand .quasar-tag { color: var(--turn); }

/* Quasar: revelar e ir ao descarte */
.destroy-show {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.destroy-flip {
  width: 112px;
  height: calc(112px * 526 / 376);
  perspective: 700px;
  flex-shrink: 0;
}
.destroy-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: destroyFlip 1.1s ease-in-out forwards;
}
.destroy-face {
  position: absolute;
  inset: 0;
  border-radius: 7% / 5%;
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
}
.destroy-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.destroy-face.front { transform: rotateY(180deg); }
@keyframes destroyFlip {
  0% { transform: rotateY(0deg) scale(.92); }
  55% { transform: rotateY(180deg) scale(1.04); }
  100% { transform: rotateY(180deg) scale(1); }
}
.destroy-equip { animation: destroyPop .45s ease-out; }
@keyframes destroyPop {
  from { transform: scale(.7); opacity: .3; }
  to { transform: none; opacity: 1; }
}
.destroy-arrow {
  font: 700 28px/1 var(--display);
  color: var(--efeito);
  animation: destroyArrow .8s ease-out .9s both;
}
@keyframes destroyArrow {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}
.destroy-discard {
  display: grid;
  gap: 4px;
  justify-items: center;
  animation: destroyArrive .55s cubic-bezier(.2, .85, .3, 1.1) 1.15s both;
}
.destroy-to-pile { width: 72px; }
@keyframes destroyArrive {
  from { opacity: 0; transform: translate(-28px, -20px) scale(.6) rotate(-12deg); }
  to { opacity: 1; transform: none; }
}

.zoom-body .quasar-pick { max-height: min(48vh, 360px); overflow: auto; padding-right: 4px; }
.die {
  width: 52px;
  height: 52px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: #2c2c30;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35), 0 6px 14px rgba(0, 0, 0, .4);
}
.face { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 3px; width: 100%; height: 100%; }
.face i { border-radius: 50%; }
.face i.on { background: var(--equip); }
.die.rolled { animation: tumble .55s cubic-bezier(.2, .8, .3, 1.2); }
@keyframes tumble {
  0% { transform: rotate(-200deg) scale(.6); }
  70% { transform: rotate(12deg) scale(1.06); }
  100% { transform: rotate(0) scale(1); }
}

.stage { min-height: 0; display: grid; align-items: start; }
.stage-empty { color: var(--faint); margin: 0; text-align: center; font-size: 13px; }
.spot, .stage-beat, .spot.decision {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.stage-beat.kind-reveal.is-lost {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 92, 114, .45);
  background: rgba(255, 92, 114, .08);
}
.stage-beat.kind-reveal.is-gain {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 239, 192, .35);
  background: rgba(0, 239, 192, .06);
}
.stage-beat.kind-reveal.is-lost .title { color: #ffb3bf; }
.stage-beat.kind-reveal.is-gain .title { color: var(--efeito); }

.spot.fresh { animation: land .4s ease-out; }
@keyframes land { from { transform: translateY(10px); opacity: .3; } to { transform: none; opacity: 1; } }
.stage-card { width: clamp(96px, 12vw, 132px); flex-shrink: 0; }
.stage-beat.kind-combat .stage-card,
.spot.decision .stage-card { width: clamp(72px, 9vh, 110px); }
.spot-text, .stage-beat-text { display: grid; gap: 8px; min-width: 0; flex: 1; }
.spot-text .title, .stage-beat .title { font-size: clamp(22px, 2.4vw, 30px); }
.stage-beat.kind-combat .title,
.spot.decision .title { font-size: clamp(16px, 1.8vw, 22px); line-height: 1.15; margin: 0; }
.actor { margin: 0; font-size: 14px; }
.rule { margin: 0; color: #c3cbef; font-size: 14px; line-height: 1.4; }
.stage-beat { flex-direction: column; gap: 12px; width: 100%; }
.stage-beat.kind-combat {
  gap: 6px;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}
.stage-beat.kind-combat .eyebrow { margin: 0; }
.stage-beat.kind-combat .stage-beat-text { gap: 6px; }
.stage-beat.kind-combat .stage-beat-main {
  gap: 10px;
  align-items: center;
  min-height: 0;
}
.stage-beat-main { display: flex; gap: 16px; align-items: flex-start; width: 100%; }
.stage-beat.kind-phase {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 207, 92, .08);
  border: 1px solid rgba(255, 207, 92, .28);
  min-height: 0;
}
.stage-beat.kind-phase .stage-beat-main { justify-content: center; text-align: center; }
.stage-beat.kind-phase .stage-beat-text { text-align: center; }
.stage-beat.kind-phase .title { font-size: 16px; margin: 0; }
.stage-beat.kind-phase .eyebrow { margin: 0 0 2px; }
.stage-beat.kind-phase.is-bare {
  padding: 4px 8px;
  border: 0;
  background: transparent;
}
.stage-beat.kind-phase.is-bare .title {
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--turn);
  opacity: .8;
}
.beat-hint {
  margin: 0;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 207, 92, .12);
  border: 1px solid rgba(255, 207, 92, .4);
  color: var(--turn);
  font-size: 12px;
  line-height: 1.3;
}
.beat-step-in {
  animation: beatStepIn .35s ease-out;
}
@keyframes beatStepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.beat-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
  overflow: hidden;
  min-height: 0;
}
.beat-steps li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(5, 8, 26, .45);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.3;
}
.beat-steps li.is-danger { border-color: rgba(255, 92, 114, .55); background: rgba(255, 92, 114, .1); }
.beat-steps li.is-win { border-color: rgba(63, 224, 160, .45); background: rgba(63, 224, 160, .08); }
.beat-step-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}
.beat-step-body { display: grid; gap: 6px; min-width: 0; }
.beat-step-text { color: var(--ink); }
.beat-actions { margin-top: 2px; }
.beat-foot { margin: 0; font-size: 11px; line-height: 1.2; }
.stage-beat.kind-combat .beat-foot { display: none; }
.stage-beat.kind-combat .beat-actions { margin-top: 0; }
.beat-die {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  padding: 7px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #2c2c30;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35);
}
.beat-die.sm { width: 36px; height: 36px; padding: 5px; }
.beat-die .face { width: 100%; height: 100%; }
.beat-die .face i.on { background: var(--equip); }

/* Nuvem de Magalhães: juntar → embaralhar → redistribuir */
.shuffle-show {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  min-height: 168px;
}
.shuf-pool {
  position: relative;
  height: 92px;
  margin: 0 auto;
  width: min(100%, 280px);
}
.shuf-card {
  position: absolute;
  width: 36px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
  left: 50%;
  top: 50%;
  margin: -25px 0 0 -18px;
}
.shuf-card img { width: 100%; display: block; }
.shuf-card.pool {
  animation:
    shufGather .9s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 45ms) both,
    shufSwirl 2.2s ease-in-out calc(.9s + var(--i) * 20ms),
    shufFadeOut .35s ease-in 3.15s forwards;
}
@keyframes shufGather {
  from { transform: translate(var(--ox), var(--oy)) rotate(calc(var(--i) * 18deg)) scale(.7); opacity: .2; }
  to { transform: translate(calc((var(--i) - 7) * 3px), calc((var(--i) % 3) * -2px)) rotate(calc(var(--i) * -4deg)) scale(1); opacity: 1; }
}
@keyframes shufSwirl {
  0% { transform: translate(calc((var(--i) - 7) * 3px), 0) rotate(0deg); }
  25% { transform: translate(calc((var(--i) - 7) * 2px), -8px) rotate(18deg); }
  50% { transform: translate(calc((var(--i) - 7) * -2px), 6px) rotate(-22deg); }
  75% { transform: translate(calc((var(--i) - 7) * 4px), -4px) rotate(14deg); }
  100% { transform: translate(calc((var(--i) - 7) * 3px), 0) rotate(calc(var(--i) * -3deg)); }
}
@keyframes shufFadeOut {
  to { opacity: 0; transform: scale(.85); }
}
.shuf-caption {
  position: relative;
  margin: 0;
  text-align: center;
  font: 600 13px/1.2 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--evento);
  min-height: 1.2em;
}
.shuf-caption span {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.shuf-caption .shuf-cap-gather { animation: shufFadeGather 6.5s linear forwards; }
.shuf-caption .shuf-cap-swirl { animation: shufFadeSwirl 6.5s linear forwards; }
.shuf-caption .shuf-cap-deal { animation: shufFadeDeal 6.5s linear forwards; }
@keyframes shufFadeGather {
  0%, 18% { opacity: 1; }
  22%, 100% { opacity: 0; }
}
@keyframes shufFadeSwirl {
  0%, 18% { opacity: 0; }
  22%, 48% { opacity: 1; }
  52%, 100% { opacity: 0; }
}
@keyframes shufFadeDeal {
  0%, 48% { opacity: 0; }
  52%, 100% { opacity: 1; }
}
.shuf-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.shuf-target {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 26, .4);
  opacity: 0;
  animation: shufTargetIn .4s ease-out calc(3.2s + var(--t) * .18s) forwards;
}
.shuf-target.is-me { border-color: rgba(138, 77, 255, .55); box-shadow: 0 0 16px rgba(138, 77, 255, .15); }
@keyframes shufTargetIn { to { opacity: 1; } }
.shuf-deal {
  position: relative;
  width: 48px;
  height: 40px;
}
.shuf-card.deal {
  width: 28px;
  margin: -20px 0 0 -14px;
  opacity: 0;
  animation: shufDeal .45s cubic-bezier(.2, .85, .3, 1.1) calc(3.35s + var(--t) * .2s + var(--k) * .09s) forwards;
}
@keyframes shufDeal {
  from { opacity: 0; transform: translate(0, -36px) scale(.6) rotate(-20deg); }
  to { opacity: 1; transform: translate(calc(var(--k) * 4px), calc(var(--k) * -2px)) scale(1) rotate(calc(var(--k) * -3deg)); }
}
.shuf-empty { color: var(--faint); font-size: 12px; line-height: 40px; }
.shuf-name { font-size: 12px; color: var(--ink); max-width: 9ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shuf-n { font-size: 11px; color: var(--evento); }

.dice-explain { display: grid; gap: 5px; margin-top: 0; }
.dice-explain.compact { gap: 4px; }
.dice-why { margin: 0; font-size: 13px; line-height: 1.35; }
.dice-bands { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dice-bands li {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 26, .35);
  font-size: 12px;
}
.dice-bands .band-range { font-family: var(--mono); font-size: 11px; color: var(--turn); }
.dice-bands .band-miss .band-range { color: var(--muted); }
.dice-bands .band-win { border-color: rgba(63, 224, 160, .4); background: rgba(63, 224, 160, .08); }
.dice-outcome {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line-2);
}
.dice-outcome.is-win { color: #9af0c8; border-color: rgba(63, 224, 160, .55); background: rgba(63, 224, 160, .12); }
.dice-outcome.is-miss { color: #c5cce6; }

.waiting { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.dot.pulse { background: var(--turn); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* seats */
.seat {
  background: rgba(15, 23, 56, .92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.seat-orbit {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  padding: 6px 10px 8px;
  gap: 4px;
  border-radius: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.seat-orbit.is-target,
.seat-orbit.is-aim-focus {
  overflow: visible;
}
.seat.is-active {
  border-color: var(--turn);
  box-shadow:
    0 0 0 2px var(--turn),
    0 0 18px rgba(255, 207, 92, .55),
    0 0 36px rgba(255, 207, 92, .28);
  animation: turnGlow 1.1s ease-in-out infinite;
}
@keyframes turnGlow {
  0%, 100% {
    border-color: #ffcf5c;
    box-shadow:
      0 0 0 2px rgba(255, 207, 92, .95),
      0 0 14px rgba(255, 207, 92, .4),
      0 0 28px rgba(255, 207, 92, .18);
  }
  50% {
    border-color: #ffe6a0;
    box-shadow:
      0 0 0 3px #ffcf5c,
      0 0 28px rgba(255, 207, 92, .85),
      0 0 52px rgba(255, 207, 92, .45);
  }
}
.seat.is-deciding { border-color: rgba(255, 207, 92, .7); }
.seat.in-range { border-color: rgba(0, 239, 192, .35); }
.seat.is-target {
  border-color: #ff5c72;
  cursor: pointer;
  animation: targetPulse 1.05s ease-in-out infinite;
}
.seat.is-target:hover {
  filter: brightness(1.06);
}
.seat.is-aim-focus {
  border-color: #ff8a9a;
  box-shadow:
    0 0 0 2px rgba(255, 92, 114, .95),
    0 0 22px rgba(255, 92, 114, .45);
  animation: none;
}
@keyframes targetPulse {
  0%, 100% {
    border-color: rgba(255, 92, 114, .85);
    box-shadow:
      0 0 0 2px rgba(255, 92, 114, .9),
      0 0 12px rgba(255, 92, 114, .35),
      0 0 22px rgba(255, 92, 114, .18);
  }
  50% {
    border-color: #ff8a9a;
    box-shadow:
      0 0 0 3px #ff5c72,
      0 0 22px rgba(255, 92, 114, .7),
      0 0 40px rgba(255, 92, 114, .35);
  }
}
.seat-equips .card.mini.is-aim-choice,
.hand-badge.is-aim-choice {
  box-shadow: 0 0 0 2px #ff5c72, 0 0 14px rgba(255, 92, 114, .55);
  animation: targetPulse 1.05s ease-in-out infinite;
  cursor: pointer;
}
.hand-badge.is-aim-choice {
  border-color: #ff5c72;
}
.aim-bar {
  position: relative;
  z-index: 30;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  align-self: center;
  max-width: 100%;
  margin: 0 auto 4px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 92, 114, .45);
  border-radius: 999px;
  background: rgba(8, 12, 36, .94);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.hand-decision {
  position: relative;
  z-index: 28;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: center;
  max-width: 100%;
  margin: 0 auto 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.hand-decision .btn {
  min-height: 36px;
  padding: 8px 18px;
  font-weight: 700;
}
.hand-decision .btn:disabled,
.hand-decision .btn[disabled] {
  opacity: .55;
  cursor: default;
}
.dock-card:has(.aim-bar),
.dock-card:has(.hand-decision) {
  padding-top: 0;
  align-items: stretch;
}
.dock-card:has(.aim-bar) .seat-mine,
.dock-card:has(.hand-decision) .seat-mine {
  padding-top: 8px;
}
.hand.picking.is-discard-pick .hand-card {
  opacity: .72;
}
.hand.picking.is-discard-pick .hand-card.picked {
  opacity: 1;
  transform: translateY(-10px);
  box-shadow: 0 0 0 2px rgba(255, 92, 114, .85), 0 10px 22px rgba(0, 0, 0, .4);
}
.hand.picking.is-discard-pick.is-keep-pick .hand-card.picked {
  box-shadow: 0 0 0 2px rgba(0, 239, 192, .75), 0 10px 22px rgba(0, 0, 0, .4);
}
.hand-pick-mark {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 5;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 16px/1 var(--display);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.hand-pick-mark.is-drop {
  background: #ff5c72;
  color: #140810;
}
.hand-pick-mark.is-keep {
  background: var(--efeito);
  color: #04141a;
}
.hand-zone.is-aiming-zone .hand.fan {
  padding-top: 16px;
}
.aim-hint {
  margin: 0;
  font: 600 12px/1.2 var(--display);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #ffd0d7;
  min-width: 0;
}
.aim-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.aim-actions .btn {
  min-height: 30px;
  padding: 5px 12px;
}
.aim-pen {
  color: var(--muted);
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.hand-card.is-aim-card {
  transform: translateY(-8px);
  z-index: 45;
  box-shadow: 0 0 0 2px #ff5c72, 0 12px 28px rgba(255, 92, 114, .35);
}
.hand.is-aiming-hand .hand-card:not(.is-aim-card) { opacity: .55; }
.seat.is-out { opacity: .5; }
.seat.is-out .planet-card img { filter: grayscale(1); }
.seat.hp-hit { box-shadow: 0 0 0 2px rgba(255, 92, 114, .65), 0 0 24px rgba(255, 92, 114, .25); }
.seat-head { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.seat-head strong { font: 700 15px/1 var(--display); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-orbit .seat-head {
  position: relative;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  min-height: 22px;
  z-index: 2;
}
.seat-orbit .seat-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(8, 12, 36, .65);
}
.seat-orbit .seat-who strong { font-size: 14px; }
.seat-orbit .seat-head .hp {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  flex: 0 0 auto;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(8, 12, 36, .65);
}
.orbit-right .seat-orbit .seat-head .hp {
  right: auto;
  left: 0;
}
.seat-body { display: flex; gap: 10px; align-items: flex-start; }
.seat-orbit .seat-body {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  align-items: stretch;
}
.planet-card { width: 72px; }
.planet-wrap {
  position: relative;
  flex: 0 0 auto;
  align-self: stretch;
  height: 100%;
  width: auto;
  max-height: 100%;
  display: flex;
  align-items: stretch;
  min-width: 0;
  z-index: 1;
}
.seat-orbit .planet-wrap {
  height: 100%;
}
.seat-orbit .planet-card {
  flex: 0 0 auto;
  align-self: stretch;
  height: 100%;
  width: auto;
  aspect-ratio: 376 / 526;
  max-height: 100%;
  position: relative;
  z-index: 1;
  background: transparent;
}
.seat-orbit .planet-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.seat-orbit .planet-card:hover { transform: none; }
.colony-stack {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  z-index: 3;
  pointer-events: none;
  max-width: 110%;
}
.colony-card {
  pointer-events: auto;
  width: clamp(22px, 28%, 34px);
  aspect-ratio: 376 / 526;
  padding: 0;
  margin-left: calc(var(--c, 0) * -6px);
  border: 1.5px solid rgba(255, 176, 92, .85);
  border-radius: 4px;
  background: #0a1028;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
  overflow: hidden;
  cursor: pointer;
  flex: 0 0 auto;
}
.colony-card:first-child { margin-left: 0; }
.colony-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.colony-card:hover {
  transform: translateY(-3px);
  z-index: 4;
  border-color: #ffc28a;
}
.dock .seat-mine .planet-wrap {
  flex: 0 0 132px;
  width: 132px;
  height: auto;
  align-self: flex-start;
  position: relative;
}
.dock .seat-mine .colony-card {
  width: 36px;
}
.seat-mine {
  padding: 8px;
  gap: 6px;
  overflow: hidden;
  max-height: 100%;
}
.seat-info { display: grid; gap: 6px; min-width: 0; flex: 1; }
.seat-orbit .seat-equips {
  display: flex;
  flex: 1 1 0;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 0;
  box-sizing: border-box;
}
.seat-orbit .seat-equips .slot,
.seat-orbit .seat-equips .card.mini {
  flex: 0 0 auto;
  position: relative;
  height: 78%;
  max-height: 78%;
  width: auto !important;
  aspect-ratio: 376 / 526;
  border-radius: 8px;
  min-width: 0;
  max-width: none;
  z-index: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.seat-orbit .seat-equips .slot {
  border: 1px dashed var(--line);
  background: rgba(5, 8, 26, .28);
  display: block;
}
.seat-orbit .seat-equips .card.mini:hover {
  transform: none;
  box-shadow: none;
}
.seat-orbit .seat-equips .card.mini img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.seat-orbit .seat-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  flex: 0 0 84px;
  width: 84px;
  min-width: 84px;
  max-height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 1px 0;
  overflow: visible;
}
.seat-orbit .seat-side .dist-badge {
  justify-content: center;
  font-size: 11px;
  padding: 6px 8px;
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.seat-orbit .seat-side .dist-badge em { font-size: 16px; }
.seat-orbit .hand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 26, .4);
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.seat-orbit .hand-badge .hand-stack { width: 34px; height: 28px; }
.seat-orbit .hand-badge .back-mini { width: 22px; }
.seat-orbit .hand-badge .hand-count { display: none; }
.seat-orbit .hand-badge .mono {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.seat-orbit .seat-side .chip {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 10px;
  line-height: 1;
  padding: 5px 8px;
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
  max-width: 100%;
}
.chip.muted-chip {
  color: var(--faint);
  border-color: var(--line);
}
.seat-orbit .hp .pip { width: 13px; height: 13px; }
.seat-orbit .hp-num { font-size: 13px; color: var(--ink); }
.hp { display: flex; align-items: center; gap: 8px; }
.hp.flash .pip.full { animation: hpPulse .7s ease-out; }
@keyframes hpPulse {
  0% { transform: scale(1); filter: hue-rotate(-40deg); }
  40% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.pips { display: flex; gap: 3px; flex-wrap: wrap; }
.pip { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #6b3f2c; }
.pip.full { border-color: transparent; background: url(img/token.png) center / cover; }
.hp-num { font-size: 11px; color: var(--muted); }
.equips { display: flex; gap: 4px; }
.slot { width: 36px; height: 50px; border-radius: 6px; border: 1px dashed var(--line); }
.card.mini { width: 36px; }
.seat-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dist-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font: 600 11px/1 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 26, .4);
}
.dist-badge em { font-style: normal; font-size: 16px; color: var(--efeito); font-family: var(--mono); }
.hand-stack {
  position: relative;
  width: 42px;
  height: 36px;
}
.hand-stack.empty {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--faint);
  font-size: 11px;
}
.back-mini {
  position: absolute;
  width: 28px;
  left: calc(var(--k) * 3px);
  top: calc(var(--k) * -2px);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.hand-count {
  position: absolute;
  right: -4px;
  bottom: -2px;
  z-index: 6;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
}
.chip.reach { color: var(--efeito); border-color: rgba(0, 239, 192, .5); }
.chip.deciding { color: var(--turn); border-color: rgba(255, 207, 92, .55); }

/* dock: um card largo — planeta+equips | mão */
.dock {
  width: 100%;
  min-width: 0;
  min-height: 0;
  position: relative;
  z-index: 6;
  overflow: visible;
}
.dock-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 18px;
  align-items: start;
  width: 100%;
  min-width: 0;
  padding: 6px 14px 10px;
  background: rgba(15, 23, 56, .92);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}
.dock-card.is-deciding { border-color: rgba(255, 207, 92, .7); }

/* Sem card interno — conteúdo direto no dock */
.dock .seat-mine {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  animation: none !important;
  padding: 0;
  gap: 0;
  width: max-content;
  max-width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  display: block;
  border-radius: 0;
}
.dock .seat-mine.is-deciding,
.dock .seat-mine.hp-hit {
  border: 0 !important;
  box-shadow: none !important;
}
.dock .seat-mine .seat-body {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 16px;
  width: max-content;
  height: auto;
  overflow: visible;
}
.dock .seat-mine .planet-card {
  flex: 0 0 132px;
  width: 132px !important;
  min-width: 132px;
  max-width: 132px !important;
  height: auto !important;
  max-height: none;
  aspect-ratio: 376 / 526;
  align-self: flex-start;
  background: transparent !important;
  border-radius: 8px;
  box-shadow: none;
  position: relative;
  z-index: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.dock .seat-mine .planet-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  vertical-align: top;
}
.dock .seat-mine .planet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
}
.dock .seat-mine .seat-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 2;
  background: transparent;
  overflow: visible;
}
.dock .seat-mine .seat-who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 0 auto;
}
.dock .seat-mine .seat-who strong { font-size: 15px; }
.dock .seat-mine .seat-col .hp { flex: 0 0 auto; }
.dock .seat-mine .seat-equips {
  display: flex;
  flex: 1 1 0;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
  margin: 0;
  position: relative;
  z-index: 2;
}
.dock .seat-mine .seat-equips .slot,
.dock .seat-mine .seat-equips .card.mini {
  flex: 0 0 auto;
  width: auto;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 376 / 526;
  border-radius: 7px;
  background: transparent !important;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 2;
  margin: 0;
}
.dock .seat-mine .seat-equips .slot {
  border: 1px dashed var(--line);
  background: rgba(5, 8, 26, .28) !important;
  display: block;
}
.dock .seat-mine .seat-equips .card.mini {
  display: block;
  padding: 0;
  line-height: 0;
}
.dock .seat-mine .seat-equips .card.mini img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dock .seat-mine .seat-equips .card.mini:hover {
  transform: none;
  box-shadow: none;
}
.dock .seat-mine .hp .pip { width: 12px; height: 12px; }
.dock .seat-mine .hp-num { font-size: 12px; color: var(--ink); }

.turn-call { margin: 0; font: 700 18px/1 var(--display); color: var(--turn); white-space: nowrap; }
.hand-zone {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  align-self: stretch;
  align-items: stretch;
}
.hand-zone.is-aiming-zone {
  gap: 6px;
  padding-top: 8px;
  align-items: center;
}
.hand-zone.is-aiming-zone .hand-top,
.hand-zone.is-aiming-zone .hand.fan {
  align-self: stretch;
  width: 100%;
}
.hand-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}
.hand-head { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 0; }
.hand-head .over { color: var(--danger); }
.turn-strip {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
}
.turn-strip .hand-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.turn-strip .hand-meta .label { margin: 0; }
.turn-strip .hand-count-right {
  font: 700 18px/1 var(--display);
  color: var(--ink);
  white-space: nowrap;
}
.turn-strip .hand-count-right.over { color: var(--danger); }
.turn-strip .turn-attacks { margin: 0; white-space: nowrap; }
.turn-strip .btn { flex: 0 0 auto; }
.turn-strip .muted { margin: 0; }
.hand.fan {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex: 0 0 auto;
  min-height: 130px;
  height: 130px;
  padding: 16px 8px 0;
  position: relative;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.hand-card {
  position: relative;
  width: clamp(76px, 7.2vw, 100px);
  margin-left: -28px;
  transform: translateY(0);
  transform-origin: bottom center;
  transition: transform .15s ease, box-shadow .15s ease, margin .15s ease;
  z-index: calc(1 + var(--i, 0));
  align-self: flex-end;
}
.hand-card:first-child { margin-left: 0; }
button.hand-card:hover,
button.hand-card.playable:hover,
button.hand-card.picked {
  transform: translateY(-14px);
  z-index: 40;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
}
.hand-card.playable { box-shadow: 0 0 0 2px rgba(0, 239, 192, .55); }
.hand.picking .hand-card { opacity: .7; }
.hand.picking .hand-card.picked {
  opacity: 1;
  transform: translateY(-14px);
  box-shadow: 0 0 0 3px var(--equip), 0 12px 28px rgba(0, 0, 0, .45);
}
.hand-card.is-arriving {
  visibility: hidden;
  pointer-events: none;
  box-shadow: none !important;
  transform: none !important;
}

.fly-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
}
.fly-card {
  position: fixed;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
  transform-origin: center center;
  animation: flyCard .72s cubic-bezier(.22, .82, .2, 1) forwards;
  will-change: transform;
}
.fly-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes flyCard {
  0% {
    transform: translate(0, 0) scale(var(--sx, 1), var(--sy, 1)) rotate(-5deg);
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(1) rotate(0deg);
  }
}

.rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  padding: 8px;
  background: rgba(15, 23, 56, .72);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.rail-rules { flex: 0 0 auto; }
.rail-rules summary,
.rail-log-head {
  cursor: pointer;
  font: 600 12px var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
}
.rail-rules ul { margin: 8px 0 0; padding-left: 16px; color: var(--muted); font-size: 12px; display: grid; gap: 4px; }
.rail-log {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rail-log-head {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--muted);
}
.rail-log-head::before {
  content: "▼ ";
  font-size: 0.85em;
}
.rail-log.is-collapsed .rail-log-head::before { content: "▶ "; }
.rail-log.is-collapsed .log { display: none; }
.rail-log.is-collapsed { flex: 0 0 auto; }
.log {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 2px 6px 0;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 4px;
  align-content: start;
  font-size: 12px;
  color: var(--muted);
}
.log li { padding: 4px 0; border-bottom: 1px solid rgba(36, 48, 112, .5); }
.log .turn-line {
  color: var(--turn);
  font-weight: 600;
  text-align: center;
  border-bottom-color: rgba(255, 207, 92, .25);
}
.log .log-attack {
  color: #ff8a9a;
  border-left: 2px solid var(--danger);
  padding-left: 8px;
}
.log .log-defense {
  color: #7dffd4;
  border-left: 2px solid var(--efeito);
  padding-left: 8px;
}
.log .log-effect {
  color: #5cffdb;
  border-left: 2px solid var(--efeito);
  padding-left: 8px;
}
.log .log-equip {
  color: #ffb066;
  border-left: 2px solid var(--equip);
  padding-left: 8px;
}
.log .log-event {
  color: #c4a0ff;
  border-left: 2px solid var(--evento);
  padding-left: 8px;
}
.log .log-damage { color: #ff8a9a; }
.log .log-heal { color: var(--ok); }
.log .log-dice { color: #d4dcff; }
.log .log-draw { color: var(--muted); }
.log .log-muted { color: var(--faint); border: 0; }
.log .private { color: #b08cff; }
.log .priv-tag {
  font-style: normal;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .75;
  margin-left: 4px;
}
.note { margin: 0; font-size: 13px; color: var(--muted); }

.choices { display: grid; gap: 8px; justify-items: start; }
.choices .row .label { width: 100%; }
.spot.decision .title { color: var(--turn); }
.pickbox {
  display: grid;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed rgba(255, 138, 0, .7);
  border-radius: 10px;
  background: rgba(255, 138, 0, .06);
}
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--equip); }
.btn.danger { background: transparent; border-color: rgba(255, 92, 114, .55); color: #ffb3bf; }
.btn.danger:hover { background: rgba(255, 92, 114, .12); border-color: var(--danger); }
.zoom .btn, .choices .btn { white-space: normal; text-align: left; line-height: 1.2; }

/* ---------- modais ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 5, 16, .74);
  backdrop-filter: blur(3px);
}
.dialog { width: min(100%, 520px); }
.dialog.wide { width: min(100%, 900px); max-height: 90vh; overflow: auto; }
.dialog.win { text-align: left; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.zoom {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 360px);
  gap: 22px;
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  background: rgba(15, 23, 56, .97);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.zoom-img { border-radius: 7% / 5%; width: 100%; }
.zoom-body { display: grid; gap: 10px; align-content: start; }
.zoom-body .title { font-size: 36px; }
.zoom-body .close { justify-self: start; margin-top: 6px; }
.pile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.pile-item { display: grid; gap: 6px; }
.pile-item img { border-radius: 7% / 5%; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  border-radius: 10px;
  background: #1d2862;
  border: 1px solid var(--line-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}

/* Em pé / estreito vertical: empilha rail embaixo */
@media (max-width: 1100px) and (orientation: portrait) {
  html:has(.game.orbital),
  body:has(.game.orbital) {
    height: auto;
    overflow: auto;
  }
  .game.orbital {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "top" "board" "rail";
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .rail { max-height: 240px; }
  .dock-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .orbit {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    min-height: 420px;
  }
}

/* Celular em pé */
@media (max-width: 760px) and (orientation: portrait) {
  .home { grid-template-columns: 1fr; gap: 28px; padding: 32px 18px; }
  .zoom { grid-template-columns: 1fr; }
  .zoom-img { max-width: 260px; margin: 0 auto; }
  .orbit,
  .orbit:has(.orbit-left:empty),
  .orbit:has(.orbit-right:empty),
  .orbit:has(.orbit-left:empty):has(.orbit-right:empty) {
    min-height: 0;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    grid-template-columns: none;
  }
  .orbit::before { display: none; }
  .orbit-side {
    display: flex;
    flex-direction: row;
    grid-template-rows: none;
    gap: 10px;
    overflow-x: auto;
    height: auto;
    padding: 0 0 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .orbit-side:empty { display: none; }
  .orbit-slot {
    width: min(280px, 84vw);
    height: auto;
    flex: 0 0 auto;
    scroll-snap-align: start;
    overflow: visible;
  }
  .orbit-slot .seat { height: auto; }
  .seat-orbit {
    grid-template-rows: auto minmax(0, auto);
    height: auto;
    gap: 4px;
    padding: 6px 8px;
  }
  .seat-orbit .seat-head {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1;
    min-height: 18px;
  }
  .seat-orbit .seat-who {
    background: transparent;
    padding: 0;
  }
  .seat-orbit .seat-head .hp {
    padding: 0;
    background: transparent;
  }
  .seat-orbit .hp .pip { width: 10px; height: 10px; }
  .seat-orbit .hp-num { font-size: 11px; }
  .seat-orbit .seat-equips { padding-top: 0; }
  .seat-orbit .seat-body { height: auto; }
  .seat-orbit .planet-card {
    width: min(42vw, 140px);
    height: auto;
    max-width: none;
    max-height: none;
  }
  .seat-orbit .planet-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  .seat-orbit .slot { width: 52px; height: 72px; }
  .seat-orbit .card.mini { width: 52px; }
  .seat-orbit .seat-side {
    flex: 0 0 64px;
    width: 64px;
    min-width: 64px;
    gap: 4px;
  }
  .seat-orbit .seat-side .dist-badge {
    font-size: 10px;
    padding: 4px 5px;
  }
  .seat-orbit .seat-side .dist-badge em { font-size: 13px; }
  .seat-orbit .hand-badge { padding: 4px 5px; gap: 4px; }
  .seat-orbit .hand-badge .hand-stack { width: 24px; height: 20px; }
  .seat-orbit .hand-badge .back-mini { width: 16px; }
  .seat-orbit .seat-side .chip {
    font-size: 9px;
    padding: 4px 5px;
  }
  .hub,
  .hub:has(.stage-beat.kind-combat),
  .hub:has(.stage-beat.kind-dice),
  .hub:has(.stage-beat.kind-shuffle),
  .hub:has(.stage-beat.kind-destroy),
  .hub:has(.stage-beat.kind-reveal),
  .hub:has(.spot.decision) {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 14px;
    overflow: visible;
    border-radius: 16px;
    border: 1px solid var(--line-2);
  }
  .hand.fan { height: 110px; }
  .stage-beat-main, .spot, .spot.decision {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .stage-beat-text, .spot-text { width: 100%; text-align: left; }
  .stage-card,
  .stage-beat.kind-combat .stage-card,
  .spot.decision .stage-card { width: min(148px, 42vw); }
  .spot-text .title, .stage-beat .title { font-size: 22px; }
  .hand-card { width: 80px; margin-left: -24px; }
  .phase { font-size: 18px; }
  .beat-steps li, .dice-bands li { grid-template-columns: 1fr; }
  .beat-steps li { text-align: left; }
  .shuf-pool { height: 80px; }
  .shuf-targets { gap: 8px; }
  .shuf-target { min-width: 64px; padding: 6px 8px; }
  .quasar-card { width: 78px; }
  .destroy-show { justify-content: center; }
  .destroy-flip { width: 96px; height: calc(96px * 526 / 376); }
}

/* Celular / tela baixa deitado: mesa inteira compacta em 100dvh */
@media (orientation: landscape) and (max-height: 520px) {
  html:has(.game.orbital),
  body:has(.game.orbital) {
    height: 100%;
    overflow: hidden;
  }
  .game.orbital {
    grid-template-columns: minmax(0, 1fr) minmax(72px, 110px);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "top top" "board rail";
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    gap: 3px;
    padding: 3px 5px 4px;
  }
  .topbar {
    gap: 6px;
    padding: 0;
  }
  .brand { font-size: 12px; letter-spacing: .14em; }
  .turninfo { gap: 6px; }
  .round { font-size: 10px; }
  .phase { font-size: 13px; }
  .roominfo { gap: 4px; }
  .roominfo .mono { font-size: 10px; letter-spacing: .08em; }
  .roominfo .btn { padding: 4px 7px; font-size: 11px; }
  .conn { font-size: 10px; }

  .board {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 3px;
    min-height: 0;
    overflow: hidden;
  }
  .orbit {
    min-height: 0;
    height: 100%;
    border-radius: 10px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  }
  .orbit-side {
    --side-gap: 2px;
    padding: 2px;
  }
  .orbit-left { padding-right: 2px; }
  .orbit-right { padding-left: 2px; }
  .orbit-right .seat-orbit .seat-body { flex-direction: row-reverse; }

  .seat-orbit {
    padding: 2px;
    gap: 0;
    border-radius: 7px;
    grid-template-rows: minmax(0, 1fr);
  }
  .seat-orbit .seat-head {
    position: absolute;
    top: 2px;
    left: 3px;
    right: 3px;
    z-index: 3;
    min-height: 0;
    pointer-events: none;
  }
  .seat-orbit .seat-who {
    padding: 0 4px;
    background: rgba(8, 12, 36, .72);
    pointer-events: auto;
  }
  .seat-orbit .seat-who strong { font-size: 10px; }
  .seat-orbit .seat-head .hp {
    padding: 0 3px;
    background: rgba(8, 12, 36, .72);
    pointer-events: auto;
  }
  .seat-orbit .chip.turn {
    font-size: 7px;
    padding: 1px 4px;
    letter-spacing: .04em;
    line-height: 1.1;
  }
  .dock .seat-mine .chip.turn {
    font-size: 7px;
    padding: 1px 4px;
    letter-spacing: .04em;
    line-height: 1.1;
  }
  .seat-orbit .hp .pip { width: 7px; height: 7px; }
  .seat-orbit .hp-num { font-size: 9px; }
  .seat-orbit .seat-body {
    gap: 3px;
    height: 100%;
    min-height: 0;
    align-items: stretch;
  }
  /* Planeta ocupa a altura toda do slot */
  .seat-orbit .planet-card {
    flex: 0 0 auto;
    align-self: stretch;
    height: 100% !important;
    width: auto !important;
    min-width: 0;
    max-width: none !important;
    max-height: 100% !important;
    aspect-ratio: 376 / 526;
  }
  .seat-orbit .planet-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  /* 2) equips um pouco maiores */
  .seat-orbit .seat-equips {
    gap: 3px;
    padding-top: 14px;
    height: 100%;
    align-self: stretch;
  }
  .seat-orbit .seat-equips .slot,
  .seat-orbit .seat-equips .card.mini {
    height: 82%;
    max-height: 82%;
    min-width: 0;
    border-radius: 4px;
  }
  /* 4) DIST / mão / alcance ainda mais compactos */
  .seat-orbit .seat-side {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    gap: 6px;
    padding: 16px 0 2px;
    justify-content: flex-start;
  }
  .seat-orbit .seat-side .dist-badge {
    font-size: 7px;
    letter-spacing: 0;
    padding: 1px 2px;
    gap: 1px;
    border-radius: 4px;
    margin-top: 0;
  }
  .seat-orbit .seat-side .dist-badge em { font-size: 9px; }
  .seat-orbit .hand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 3px;
    gap: 3px;
    border-radius: 4px;
    overflow: visible;
    min-width: 0;
  }
  .seat-orbit .hand-badge .hand-stack {
    display: block;
    position: relative;
    flex: 0 0 14px;
    width: 14px;
    height: 12px;
    overflow: hidden;
  }
  .seat-orbit .hand-badge .back-mini {
    width: 10px;
  }
  .seat-orbit .hand-badge .mono {
    font-size: 10px;
    line-height: 1;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
  }
  .seat-orbit .seat-side .chip {
    font-size: 6px;
    letter-spacing: 0;
    padding: 1px 2px;
    border-radius: 4px;
  }

  .hub {
    padding: 4px 6px;
    gap: 4px;
    overflow: hidden;
  }
  .hub-mid .hub-last {
    width: clamp(52px, 12vh, 72px);
    max-height: min(36%, 96px);
  }
  .hub-last-play { gap: 4px; width: min(100%, 280px); }
  .hub-last-meta .title { font-size: 13px; }
  .hub-last-meta .actor { font-size: 11px; }
  .hub:has(.stage-beat.kind-combat),
  .hub:has(.stage-beat.kind-dice),
  .hub:has(.stage-beat.kind-shuffle),
  .hub:has(.stage-beat.kind-destroy),
  .hub:has(.stage-beat.kind-reveal),
  .hub:has(.spot.decision) {
    padding: 4px 6px;
  }
  .hub .stage { overflow: hidden; }
  .hub-piles { gap: 4px; }
  .pile { width: 40px; gap: 2px; }
  .pile .card { width: 34px; }
  .pile.dice { width: 44px; }
  .pile .count { font-size: 8px; min-height: 0; }
  .pile .label { font-size: 8px; letter-spacing: .06em; }
  .stage-card,
  .stage-beat.kind-combat .stage-card,
  .spot.decision .stage-card { width: clamp(56px, 10vh, 84px); }
  .spot-text .title, .stage-beat .title { font-size: 14px; }
  .spot-text, .stage-beat-text { gap: 4px; font-size: 11px; }

  .dock-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 6px;
    align-items: start;
    padding: 2px 6px 3px;
    border-radius: 8px;
  }
  .dock .seat-mine .seat-body { gap: 6px; }
  .dock .seat-mine .planet-wrap {
    flex-basis: 56px;
    width: 56px;
  }
  .dock .seat-mine .planet-card {
    flex-basis: 56px;
    width: 56px !important;
    min-width: 56px;
    max-width: 56px !important;
  }
  .dock .seat-mine .colony-card { width: 18px; }
  .dock .seat-mine .seat-who strong { font-size: 11px; }
  .dock .seat-mine .hp .pip { width: 8px; height: 8px; }
  .dock .seat-mine .hp-num { font-size: 9px; }
  .dock .seat-mine .seat-equips { gap: 3px; }
  .dock .seat-mine .seat-equips .slot,
  .dock .seat-mine .seat-equips .card.mini {
    border-radius: 3px;
  }
  .hand-zone { gap: 1px; }
  .hand-top {
    gap: 4px;
    min-height: 0;
    line-height: 1;
  }
  .hand-head { min-height: 0; }
  .turn-strip {
    gap: 4px 6px;
    flex-wrap: nowrap;
  }
  .turn-strip .hand-meta { gap: 3px; }
  .turn-strip .hand-meta .label {
    font-size: 9px;
    letter-spacing: .08em;
  }
  .turn-strip .hand-count-right { font-size: 12px; }
  .turn-strip .turn-attacks {
    font-size: 9px;
    white-space: nowrap;
  }
  .turn-strip .btn {
    padding: 3px 7px;
    font-size: 10px;
    min-height: 0;
    line-height: 1.1;
  }
  .hand.fan {
    min-height: 52px;
    height: 52px;
    padding: 0;
  }
  .hand-card { width: 40px; margin-left: -14px; }
  button.hand-card:hover,
  button.hand-card.playable:hover,
  button.hand-card.picked,
  .hand.picking .hand-card.picked {
    transform: translateY(-6px);
  }

  .rail {
    gap: 4px;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .rail-rules { display: none; }
  .rail-log-head { font-size: 10px; padding: 2px 0; }
  .log {
    margin-top: 4px;
    padding: 0 0 4px;
    font-size: 9px;
    line-height: 1.25;
  }
}

/* ---------- contas, perfil e ranking ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
.topbar { gap: 14px; }
.topbar .brand { background: none; border: 0; cursor: pointer; padding: 0; }
.topnav { display: flex; gap: 6px; margin-left: auto; }
.userchip { display: flex; align-items: center; gap: 10px; }
.userchip-txt { display: grid; line-height: 1.15; font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.avatar.big { width: 84px; height: 84px; }
.avatar.tiny { width: 22px; height: 22px; vertical-align: -6px; margin-right: 7px; }

.card-form {
  width: min(100%, 460px);
  margin: 24px auto;
  display: grid;
  gap: 14px;
  padding: 24px;
  background: rgba(15, 23, 56, .92);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.card-form.inline { margin: 24px 0 0; width: 100%; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(255, 92, 114, .12); border: 1px solid rgba(255, 92, 114, .5); color: #ffc2ca; }
.form-aviso { margin: 0; padding: 10px 12px; border-radius: 8px; background: rgba(255, 207, 92, .1); border: 1px solid rgba(255, 207, 92, .45); color: #ffe3ab; }
.row.between { justify-content: space-between; }
.avatares { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-opt input { position: absolute; opacity: 0; }
.avatar-opt img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; object-fit: cover; }
.avatar-opt input:checked + img { border-color: var(--efeito); }
.avatar-opt input:focus-visible + img { outline: 2px solid var(--turn); }

.chip.ranked { background: var(--turn); color: #2a1d00; border-color: transparent; }

.profile { display: grid; gap: 18px; }
.profile-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.division { margin: 4px 0; font: 700 22px/1 var(--display); color: var(--turn); }
.progress { width: min(320px, 100%); height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 8px 0 4px; }
.progress i { display: block; height: 100%; background: var(--efeito); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { display: grid; gap: 4px; padding: 12px; background: rgba(15, 23, 56, .8); border: 1px solid var(--line); border-radius: 12px; }
.stat strong { font-size: 22px; }
.matches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.matches li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; background: rgba(15, 23, 56, .7); border: 1px solid var(--line); border-radius: 10px; }
.matches .data { color: var(--muted); }
.matches .rivais { flex: 1 1 200px; text-align: right; font-size: 12px; }
.up { color: var(--ok); }
.down { color: var(--danger); }

.ranking { display: grid; gap: 14px; }
.tabela-rolagem { overflow-x: auto; }
.ranking-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ranking-table th, .ranking-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ranking-table th { font: 600 12px var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.ranking-table .num { text-align: right; }
.ranking-table tr.eu { background: rgba(0, 239, 192, .08); }
.linkish { background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; display: inline-flex; align-items: center; }
.linkish:hover { color: var(--efeito); }

.dialog.result { display: grid; gap: 10px; text-align: left; }
.rating-delta { margin: 0; font: 700 40px/1 var(--display); }
.rating-delta.up { color: var(--ok); }
.rating-delta.down { color: var(--danger); }
.result-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.result-list li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--deep); }
.result-list li.eu { background: var(--panel-2); }
.result-list .pos { width: 34px; color: var(--muted); }
.game-top { padding: 10px 12px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
