/* ---------- Batch 3: reactions, crown, rules button, footer ---------- */
/* reactions: floating layer + dock + panel */
.reactions-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 60;
}
.rx-float {
  position: absolute;
  bottom: 90px;
  font-size: 2.6rem;
  text-align: center;
  animation: rxrise 3.8s ease-out forwards;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.rx-float .rx-name {
  display: block;
  font-size: 0.7rem;
  font-family: var(--display);
  color: var(--cream);
  background: rgba(0,0,0,0.45);
  border-radius: 8px;
  padding: 1px 6px;
  margin-top: 2px;
}
@keyframes rxrise {
  0%   { transform: translateY(0) translateX(0) scale(0.6); opacity: 0; }
  12%  { opacity: 1; transform: translateY(-15px) scale(1.0); }
  100% { transform: translateY(-60vh) translateX(var(--drift,0)) scale(1.6); opacity: 0; }
}

.reaction-dock {
  /* Right side, not left: on the in-game table the hand tray/action bar sit
     centered at the bottom, and a left-bottom dock ended up floating over
     hand cards there. The right corner stays clear on every game's layout. */
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 61;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.reaction-fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--panel);
  font-size: 1.5rem;
  cursor: pointer;
  /* `button` (base.css) sets a 12px/16px padding meant for text buttons,
     which pushed this emoji off-center in a circular button; override to a
     true centered layout, and use the border (plus a soft gold halo) to
     make it read clearly as its own floating control against the felt. */
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45), 0 0 0 3px rgba(230,178,60,0.16);
  transition: transform 0.12s ease;
}
.reaction-fab:hover { transform: scale(1.08); }
.reaction-fab .ico, .ts-fab .ico { width: 24px; height: 24px; color: var(--gold); }
.reaction-panel[hidden] { display: none; }
.reaction-panel {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  width: 232px;
  z-index: 70;
  gap: 6px;
}
.rx-recent-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rx-recent-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--sub);
  letter-spacing: 0.05em;
  font-family: var(--display);
  margin-left: 2px;
}
.rx-recent-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.rx-divider {
  height: 1px;
  background: var(--line);
  margin: 2px 2px;
}
.rx-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.rx-grid .rx, .rx-recent-grid .rx {
  width: 40px; height: 40px;
  border: none; background: transparent;
  font-size: 1.5rem; cursor: pointer; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s ease, transform 0.12s ease;
}
.rx-grid .rx:hover, .rx-recent-grid .rx:hover {
  background: rgba(255,255,255,0.08);
  transform: scale(1.15);
}

/* host crown in scoreboard + non-crowding layout */
.sb-name { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.sb-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-score { flex: 0 0 auto; padding-left: 0.5rem; }
.host-crown { color: var(--gold); font-size: 0.9rem; flex: 0 0 auto; }


@media (max-width: 560px) {
  .wordmark { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .reaction-fab { width: 46px; height: 46px; font-size: 1.3rem; }
  .reaction-dock { right: 10px; bottom: 10px; }
}

/* ---------- small phones: general mobile polish ---------- */
@media (max-width: 480px) {
  .card-panel { padding: 1.1rem; }
  .settings-grid { grid-template-columns: 1fr; }

  .topbar { padding: 0.7rem 0.7rem; gap: 0.5rem; }
  .topbar-right { justify-content: flex-end; gap: 0.4rem; }
  .brand-symbol { height: 28px; }
  .brand-name { font-size: 1.02rem; }
  .round-chip { font-size: 0.75rem; padding: 0.25rem 0.55rem; }

  .settings-edit, .settings-readout { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); }

  .table-view { padding: 0.75rem 0.6rem 1.5rem; gap: 0.75rem; }
  .felt { padding: 0.85rem; gap: 0.9rem; }
  .center-row { gap: 1rem; min-height: 110px; }
  .deck img { width: 54px; height: 76px; }
  .center-card { width: 50px; height: 70px; }
  .discard { min-width: 74px; }

  .action-bar { gap: 0.5rem; }
  .play-label { min-width: 0; flex: 1 1 100%; text-align: center; }
  .action-btns { flex: 1 1 100%; justify-content: center; }

  .modal { padding: 1.15rem 1.1rem; max-height: 88vh; }
  .modal.roundend { max-width: 100%; }
}

