/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f0eb;
  --text: #1a1a1a;
  --muted: #7c6f64;
  --accent: #5a7a6a;
  --accent-hover: #3e5a4c;
  --name-color: #2c3e7a;
  --font: "Georgia", serif;
  --mono: "Courier New", monospace;
}

html {
  font-size: 18px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
  animation: bg-shift 20s ease-in-out infinite alternate;
}

@keyframes bg-shift {
  0% {
    background-color: #f5f0eb;
  }

  33% {
    background-color: #f0edf5;
  }

  66% {
    background-color: #f5ede8;
  }

  100% {
    background-color: #edf0f5;
  }
}

/* Ruby logo background */
.bg-ruby {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 320px;
  height: 320px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 1;
  animation: ruby-float 12s ease-in-out infinite alternate;
}

@keyframes ruby-float {
  from {
    transform: translateY(0) rotate(0deg);
  }

  to {
    transform: translateY(16px) rotate(6deg);
  }
}

/* Grain overlay */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 10;
  animation: grain-drift 8s steps(2) infinite;
}

@keyframes grain-drift {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-2%, -3%);
  }

  50% {
    transform: translate(3%, 1%);
  }

  75% {
    transform: translate(-1%, 4%);
  }

  100% {
    transform: translate(0, 0);
  }
}

/* Blobs */
.bg-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  filter: blur(90px);
  opacity: 0.5;
}

.blob-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #5a7a6a55, #7aa08822);
  top: -120px;
  left: -120px;
  animation: drift1 14s ease-in-out infinite alternate, morph1 10s ease-in-out infinite alternate;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #2c3e7a44, #5b6abf22);
  bottom: -100px;
  right: -100px;
  animation: drift2 18s ease-in-out infinite alternate, morph2 13s ease-in-out infinite alternate;
}

.blob-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #7a8a5a44, #a0a87222);
  top: 40%;
  left: 55%;
  animation: drift3 22s ease-in-out infinite alternate, morph3 16s ease-in-out infinite alternate;
}

@keyframes drift1 {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(80px, 100px);
  }
}

@keyframes drift2 {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(-60px, -70px);
  }
}

@keyframes drift3 {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(-80px, 60px);
  }
}

@keyframes morph1 {
  0% {
    border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  }

  50% {
    border-radius: 40% 60% 30% 70% / 60% 40% 60% 40%;
  }

  100% {
    border-radius: 70% 30% 50% 50% / 40% 70% 30% 60%;
  }
}

@keyframes morph2 {
  0% {
    border-radius: 50% 50% 60% 40% / 40% 60% 50% 50%;
  }

  50% {
    border-radius: 70% 30% 40% 60% / 60% 40% 70% 30%;
  }

  100% {
    border-radius: 30% 70% 60% 40% / 50% 50% 40% 60%;
  }
}

@keyframes morph3 {
  0% {
    border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
  }

  50% {
    border-radius: 60% 40% 30% 70% / 40% 60% 40% 60%;
  }

  100% {
    border-radius: 50% 50% 70% 30% / 50% 50% 60% 40%;
  }
}

/* Floating particles */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particles span {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0;
  animation: float-up linear infinite;
}

.particles span:nth-child(1) {
  width: 6px;
  height: 6px;
  left: 10%;
  background: #5a7a6a55;
  animation-duration: 12s;
  animation-delay: 0s;
}

.particles span:nth-child(2) {
  width: 4px;
  height: 4px;
  left: 25%;
  background: #2c3e7a44;
  animation-duration: 16s;
  animation-delay: 2s;
}

.particles span:nth-child(3) {
  width: 8px;
  height: 8px;
  left: 40%;
  background: #7a8a5a44;
  animation-duration: 10s;
  animation-delay: 4s;
}

.particles span:nth-child(4) {
  width: 5px;
  height: 5px;
  left: 55%;
  background: #5a7a6a44;
  animation-duration: 14s;
  animation-delay: 1s;
}

.particles span:nth-child(5) {
  width: 3px;
  height: 3px;
  left: 70%;
  background: #2c3e7a55;
  animation-duration: 18s;
  animation-delay: 3s;
}

.particles span:nth-child(6) {
  width: 7px;
  height: 7px;
  left: 80%;
  background: #7a8a5a33;
  animation-duration: 11s;
  animation-delay: 5s;
}

.particles span:nth-child(7) {
  width: 4px;
  height: 4px;
  left: 15%;
  background: #5a7a6a33;
  animation-duration: 20s;
  animation-delay: 6s;
}

.particles span:nth-child(8) {
  width: 6px;
  height: 6px;
  left: 60%;
  background: #2c3e7a33;
  animation-duration: 13s;
  animation-delay: 7s;
}

.particles span:nth-child(9) {
  width: 3px;
  height: 3px;
  left: 35%;
  background: #7a8a5a55;
  animation-duration: 15s;
  animation-delay: 2s;
}

.particles span:nth-child(10) {
  width: 5px;
  height: 5px;
  left: 90%;
  background: #5a7a6a44;
  animation-duration: 17s;
  animation-delay: 9s;
}

@keyframes float-up {
  0% {
    transform: translateY(110vh) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 0.7;
  }

  90% {
    opacity: 0.4;
  }

  100% {
    transform: translateY(-10vh) translateX(30px);
    opacity: 0;
  }
}

main {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
}

.clock {
  position: fixed;
  bottom: 1.5rem;
  right: 2rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  z-index: 2;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.clock:hover {
  opacity: 1;
}

.page-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  z-index: 20;
  border: 1px solid #ddd6ce;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  background: rgba(245, 240, 235, 0.7);
  backdrop-filter: blur(8px);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, color 0.15s;
}

.page-counter:hover {
  border-color: #bbb;
  color: var(--text);
}

.breakdown-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 0.6rem);
  left: 0;
  min-width: 200px;
  background: rgba(250, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid #ddd6ce;
  border-radius: 10px;
  padding: 0.6rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 21;
}

.breakdown-list {
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ddd6ce transparent;
}

.breakdown-popup.open {
  display: block;
  animation: popup-in 0.15s ease;
}

@keyframes popup-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
}

.breakdown-row:hover {
  background: rgba(0, 0, 0, 0.03);
}

.breakdown-flag {
  font-size: 1rem;
  line-height: 1;
}

.breakdown-country {
  flex: 1;
  color: var(--text);
}

.breakdown-count {
  color: var(--accent);
  font-weight: bold;
}

.breakdown-empty {
  padding: 0.5rem 0.8rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero {
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: normal;
  letter-spacing: -0.02em;
  color: var(--name-color);
}

.tagline {
  color: #7a8a5a;
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.about {
  margin-bottom: 2.5rem;
}

.about p {
  color: #333;
}

.contact-btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: background 0.2s, box-shadow 0.2s;
}

.contact-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.1);
}

body:has(.bxx-game) {
  display: block;
  overflow: hidden;
  padding: 0;
  background: #173c34;
  animation: none;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
}

.bxx-game {
  height: 100vh;
  color: #f7fbf6;
  background:
    radial-gradient(circle at 18% 12%, rgba(239, 204, 112, 0.18), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(104, 184, 156, 0.22), transparent 26%),
    linear-gradient(135deg, #12342e, #225545 54%, #102b30);
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

.bxx-game button,
.bxx-game input {
  touch-action: manipulation;
}

.bxx-topbar,
.bxx-center-panel,
.bxx-seat {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 27, 24, 0.52);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.bxx-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-sizing: border-box;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto 8px;
  padding: 10px 14px;
  border-radius: 8px;
}

.bxx-room-form {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(180px, 240px) auto auto auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.bxx-room-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bxx-room-form label span {
  color: #b9d3c8;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bxx-room-form input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 0 10px;
  color: #f7fbf6;
  background: rgba(255, 255, 255, 0.09);
  font: inherit;
  outline: none;
}

.bxx-room-form input:focus {
  border-color: rgba(255, 211, 106, 0.78);
}

.bxx-room-form button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 0 12px;
  color: #173c34;
  background: #ffd36a;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.bxx-room-form button[type="button"] {
  color: #f7fbf6;
  background: rgba(255, 255, 255, 0.09);
}

.bxx-room-form p {
  grid-column: 1 / -1;
  min-height: 1rem;
  color: #b9d3c8;
  font-size: 0.66rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bxx-kicker,
.bxx-label,
.bxx-hint {
  color: #b9d3c8;
  font-size: 0.78rem;
}

.bxx-kicker,
.bxx-label {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bxx-topbar h1 {
  color: #fff8e1;
  font-size: 1.34rem;
  line-height: 1.1;
  font-weight: 800;
}

.bxx-room-toggle {
  display: none;
}

.bxx-version {
  margin-top: 3px;
  color: rgba(219, 234, 228, 0.72);
  font-size: 0.68rem;
  font-weight: 750;
}

.bxx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.bxx-player-actions {
  margin-bottom: 8px;
}

.bxx-actions button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 0 14px;
  color: #f7fbf6;
  background: rgba(255, 255, 255, 0.09);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.bxx-actions button:hover,
.bxx-card:hover,
.bxx-lane:hover {
  border-color: rgba(255, 231, 156, 0.72);
}

.bxx-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.bxx-actions button:disabled:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.bxx-actions .bxx-primary {
  color: #173c34;
  background: #ffd36a;
  border-color: #ffd36a;
}

.bxx-actions .bxx-primary.submitting {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  opacity: 0.78;
}

.bxx-submit-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(23, 60, 52, 0.28);
  border-top-color: #173c34;
  border-radius: 50%;
  animation: bxx-submit-spin 650ms linear infinite;
}

@keyframes bxx-submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.bxx-actions .bxx-icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.bxx-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bxx-icon-button.analyzing svg {
  animation: bxx-submit-spin 900ms linear infinite;
}

.bxx-reset-action {
  margin-left: auto;
}

.bxx-table {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.bxx-seat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas:
    "center center center"
    "left top right"
    "player player player";
  gap: 8px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.bxx-seat-slot {
  min-width: 0;
  min-height: 0;
}

.bxx-seat-slot>.bxx-seat {
  height: 100%;
}

.bxx-seat-top {
  grid-area: top;
  z-index: 2;
}

.bxx-seat-left {
  grid-area: left;
  z-index: 2;
}

.bxx-seat-right {
  grid-area: right;
  z-index: 2;
}

.bxx-seat-player {
  grid-area: player;
  min-height: 0;
}

.bxx-seat-player>.bxx-seat {
  min-height: 0;
  overflow: hidden;
  align-self: start;
}

.bxx-center-panel {
  grid-area: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: clamp(210px, 25vh, 270px);
  border-radius: 8px;
  padding: 10px;
  text-align: left;
}

.bxx-info-panel,
.bxx-chat-panel {
  min-width: 0;
  min-height: 0;
}

.bxx-info-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(118px, 1fr);
  gap: 7px;
  overflow: hidden;
}

.bxx-info-panel>div:first-child {
  min-width: 0;
}

.bxx-info-panel>div:nth-child(2) {
  min-width: 118px;
  text-align: right;
}

.bxx-chat-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 12px;
}

.bxx-chat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.bxx-chat-head span {
  color: #ffd36a;
  font-size: 0.72rem;
  font-weight: 850;
}

.bxx-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.bxx-chat-unread {
  position: absolute;
  right: 12px;
  bottom: 43px;
  z-index: 2;
  min-height: 28px;
  border: 1px solid rgba(255, 211, 106, 0.74);
  border-radius: 999px;
  padding: 0 11px;
  color: #173c34;
  background: #ffd36a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.bxx-chat-unread[hidden] {
  display: none;
}

.bxx-chat-empty {
  color: #b9d3c8;
  font-size: 0.72rem;
  text-align: center;
}

.bxx-chat-message {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  align-self: flex-start;
  width: fit-content;
  max-width: 88%;
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.bxx-chat-message.own {
  align-self: flex-end;
  background: rgba(255, 211, 106, 0.18);
}

.bxx-chat-message.bot {
  align-self: stretch;
  width: auto;
  border: 1px solid rgba(255, 211, 106, 0.24);
}

.bxx-chat-message.taunt {
  border: 1px solid rgba(255, 211, 106, 0.58);
  background:
    radial-gradient(circle at 18% 110%, rgba(255, 74, 24, 0.82) 0 18%, transparent 38%),
    radial-gradient(circle at 58% 118%, rgba(255, 178, 37, 0.86) 0 16%, transparent 36%),
    radial-gradient(circle at 92% 108%, rgba(255, 65, 20, 0.72) 0 14%, transparent 34%),
    linear-gradient(180deg, rgba(52, 11, 7, 0.84), rgba(20, 7, 5, 0.78));
  box-shadow:
    0 0 14px rgba(255, 111, 30, 0.32),
    inset 0 0 18px rgba(255, 211, 106, 0.1);
  animation: bxx-chat-fire-pulse 1.6s ease-in-out infinite;
}

.bxx-chat-message.taunt::before,
.bxx-chat-message.taunt::after {
  content: "";
  position: absolute;
  inset: auto -10% -38% -10%;
  z-index: 0;
  height: 78%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 92%, rgba(255, 217, 94, 0.92) 0 12%, transparent 34%),
    radial-gradient(ellipse at 34% 88%, rgba(255, 80, 16, 0.88) 0 14%, transparent 36%),
    radial-gradient(ellipse at 61% 92%, rgba(255, 196, 57, 0.84) 0 13%, transparent 34%),
    radial-gradient(ellipse at 83% 90%, rgba(255, 70, 20, 0.8) 0 12%, transparent 35%);
  filter: blur(0.5px);
  transform-origin: 50% 100%;
  animation: bxx-chat-flame 900ms ease-in-out infinite alternate;
}

.bxx-chat-message.taunt::after {
  bottom: -46%;
  opacity: 0.72;
  filter: blur(5px);
  animation-duration: 1.2s;
  animation-delay: -450ms;
}

.bxx-chat-message.taunt strong,
.bxx-chat-message.taunt span,
.bxx-chat-message.taunt p {
  position: relative;
  z-index: 1;
}

.bxx-chat-message.taunt strong,
.bxx-chat-message.taunt p {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.bxx-chat-message.taunt span {
  color: #ffe79a;
}

@keyframes bxx-chat-flame {
  from {
    transform: translateY(4px) scaleX(0.96) skewX(-3deg);
    opacity: 0.72;
  }

  to {
    transform: translateY(-8px) scaleX(1.04) skewX(3deg);
    opacity: 1;
  }
}

@keyframes bxx-chat-fire-pulse {
  0%,
  100% {
    box-shadow:
      0 0 12px rgba(255, 111, 30, 0.28),
      inset 0 0 16px rgba(255, 211, 106, 0.09);
  }

  50% {
    box-shadow:
      0 0 20px rgba(255, 111, 30, 0.48),
      inset 0 0 22px rgba(255, 211, 106, 0.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bxx-chat-message.taunt,
  .bxx-chat-message.taunt::before,
  .bxx-chat-message.taunt::after {
    animation: none;
  }
}

.bxx-chat-message header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.bxx-chat-message strong {
  color: #fff8e1;
  font-size: 0.76rem;
}

.bxx-chat-message span {
  color: #ffd36a;
  font-size: 0.62rem;
  font-weight: 750;
}

.bxx-chat-message p {
  color: #f7fbf6;
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bxx-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}

.bxx-chat-form input {
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 0 10px;
  color: #f7fbf6;
  background: rgba(255, 255, 255, 0.09);
  font: inherit;
  font-size: 0.78rem;
  outline: none;
}

.bxx-chat-form input:focus {
  border-color: rgba(255, 211, 106, 0.78);
}

.bxx-chat-form button {
  min-height: 34px;
  border: 1px solid #ffd36a;
  border-radius: 6px;
  padding: 0 12px;
  color: #173c34;
  background: #ffd36a;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.bxx-seat {
  min-height: 96px;
  border-radius: 8px;
  padding: 9px;
  overflow: visible;
}

.bxx-seat-top .bxx-seat,
.bxx-seat-left .bxx-seat,
.bxx-seat-right .bxx-seat {
  height: auto;
  min-height: 96px;
  overflow: hidden;
}

.bxx-seat-top .bxx-seat.bxx-bot-seat,
.bxx-seat-left .bxx-seat.bxx-bot-seat,
.bxx-seat-right .bxx-seat.bxx-bot-seat {
  padding: 8px;
}

.bxx-seat-top .bxx-seat.bxx-bot-seat.compact,
.bxx-seat-left .bxx-seat.bxx-bot-seat.compact,
.bxx-seat-right .bxx-seat.bxx-bot-seat.compact {
  min-height: 96px;
}

.bxx-seat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.bxx-seat-head strong {
  color: #fff8e1;
  font-size: 0.98rem;
}

.bxx-seat-head .bxx-bankroll {
  margin-left: 6px;
  color: #ffd36a;
  font-size: 0.78rem;
}

.bxx-seat-head span {
  color: #ffd36a;
  font-size: 0.82rem;
  font-weight: 850;
}

.bxx-player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  gap: 8px;
  align-items: start;
  min-height: 0;
  overflow: hidden;
}

.bxx-player-seat {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
}

.bxx-opponents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.bxx-opponent {
  min-height: 128px;
  border-radius: 8px;
  padding: 12px;
}

.bxx-opponent strong {
  display: block;
  margin-bottom: 8px;
  color: #fff8e1;
  font-size: 0.92rem;
}

.bxx-card-backs {
  display: grid;
  grid-template-columns: repeat(13, minmax(8px, 1fr));
  gap: 3px;
}

.bxx-card-backs span {
  height: 42px;
  border-radius: 5px;
  background:
    linear-gradient(135deg, transparent 42%, rgba(255, 255, 255, 0.22) 42% 58%, transparent 58%),
    #953840;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.bxx-opponent-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 8px;
  border-radius: 7px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.06);
}

.bxx-opponent-compact span,
.bxx-opponent-compact small {
  color: #b9d3c8;
  font-size: 0.68rem;
  font-weight: 800;
}

.bxx-opponent-compact strong {
  justify-self: end;
  color: #ffd36a;
  font-size: 0.9rem;
  font-weight: 950;
}

.bxx-opponent-compact small {
  grid-column: 1 / -1;
  color: #dbeae4;
}

.bxx-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
  border-radius: 8px;
  padding: 14px;
}

.bxx-lanes {
  display: grid;
  gap: 6px;
  min-height: 0;
  align-content: start;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.bxx-lane {
  width: 100%;
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
  cursor: pointer;
}

.bxx-lane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.bxx-lane-head strong {
  color: #fff8e1;
  font-size: 0.88rem;
}

.bxx-lane-head small {
  color: #b9d3c8;
  font-size: 0.78rem;
}

.bxx-lane-cards,
.bxx-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bxx-slot,
.bxx-card {
  width: 36px;
  height: 50px;
  border-radius: 7px;
}

.bxx-slot {
  display: inline-block;
  border: 1px dashed rgba(255, 255, 255, 0.26);
  background: rgba(0, 0, 0, 0.12);
}

.bxx-card {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid rgba(10, 22, 20, 0.22);
  padding: 5px;
  color: #18211f;
  background: #fffdf6;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.bxx-card.reveal {
  animation: bxx-card-reveal 600ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
  transform-origin: center;
  backface-visibility: hidden;
}

.bxx-card.deal {
  animation: bxx-card-deal 520ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
  animation-delay: var(--deal-delay, 0ms);
  transform-origin: center;
  backface-visibility: hidden;
}

.bxx-card.arranging {
  z-index: 6;
  pointer-events: none;
  will-change: transform, opacity;
}

.bxx-card.reveal::before,
.bxx-card.deal::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 2;
  border-radius: inherit;
  background:
    linear-gradient(135deg, transparent 42%, rgba(255, 255, 255, 0.22) 42% 58%, transparent 58%),
    #953840;
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0;
  pointer-events: none;
}

.bxx-card.reveal::before {
  animation: bxx-card-back-reveal 600ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

.bxx-card.deal::before {
  animation: bxx-card-back-deal 520ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
  animation-delay: var(--deal-delay, 0ms);
}

@keyframes bxx-card-reveal {
  0% {
    transform: scaleX(1) translateY(4px);
    filter: brightness(0.8);
  }

  48% {
    transform: scaleX(0.08) translateY(4px);
    filter: brightness(0.9);
  }

  56% {
    transform: scaleX(0.08) translateY(4px);
    filter: brightness(0.95);
  }

  100% {
    transform: scaleX(1) translateY(0);
    filter: brightness(1);
  }
}

@keyframes bxx-card-back-reveal {

  0%,
  48% {
    opacity: 1;
  }

  54%,
  100% {
    opacity: 0;
  }
}

@keyframes bxx-card-deal {
  0% {
    transform: scaleX(1) translateY(-5px);
    filter: brightness(0.85);
  }

  50% {
    transform: scaleX(0.08) translateY(-5px);
    filter: brightness(0.92);
  }

  58% {
    transform: scaleX(0.08) translateY(-5px);
    filter: brightness(0.96);
  }

  100% {
    transform: scaleX(1) translateY(0);
    filter: brightness(1);
  }
}

@keyframes bxx-card-back-deal {

  0%,
  50% {
    opacity: 1;
  }

  58%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  .bxx-card.reveal,
  .bxx-card.reveal::before,
  .bxx-card.deal,
  .bxx-card.deal::before {
    animation: none;
  }
}

.bxx-card[draggable="true"] {
  cursor: grab;
}

.bxx-card[draggable="true"]:active {
  cursor: grabbing;
}

.bxx-card span:last-child {
  align-self: flex-end;
  font-size: 0.9rem;
}

.bxx-card.red {
  color: #b82d3a;
}

.bxx-card.selected {
  outline: 3px solid #ffd36a;
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(255, 211, 106, 0.28);
}

.bxx-card.small {
  width: 24px;
  height: 34px;
  border-radius: 4px;
  padding: 3px;
  font-size: 0.58rem;
  box-shadow: none;
}

.bxx-card.small span:last-child {
  font-size: 0.72rem;
}

.bxx-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 6px;
}

.bxx-center-panel {
  position: relative;
  overflow: hidden;
}

.bxx-center-panel.loading-results .bxx-info-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: -45%;
  z-index: 1;
  width: 45%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #ffd36a, transparent);
  animation: bxx-panel-loading 1s ease-in-out infinite;
}

.bxx-center-panel.loading-results .bxx-status::after {
  content: " Đang mở bài...";
  color: #ffd36a;
}

@keyframes bxx-panel-loading {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(320%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bxx-center-panel.loading-results .bxx-info-panel::before {
    animation: none;
    left: 0;
    width: 100%;
  }
}

.bxx-status {
  margin-top: 4px;
  color: #fff8e1;
  font-weight: 750;
}

.bxx-score {
  margin-top: 4px;
  color: #ffd36a;
  font-size: 1.7rem;
  font-weight: 900;
}

.bxx-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bxx-history-toggle {
  display: none;
}

.bxx-history {
  display: grid;
  grid-column: 1 / -1;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 5px;
  width: 100%;
  min-height: 0;
  text-align: left;
}

.bxx-history>div {
  display: grid;
  gap: 5px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.bxx-history>div>p {
  color: #b9d3c8;
  font-size: 0.68rem;
}

.bxx-history-round {
  border-radius: 6px;
  padding: 5px 6px;
  background: rgba(0, 0, 0, 0.14);
}

.bxx-history-round header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.bxx-history-round strong {
  color: #fff8e1;
  font-size: 0.7rem;
}

.bxx-history-round header span {
  color: #ffd36a;
  font-size: 0.66rem;
  font-weight: 800;
}

.bxx-history-scores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.bxx-history-scores span {
  border-radius: 999px;
  padding: 2px 6px;
  color: #dbeae4;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.62rem;
  font-weight: 750;
}

.bxx-history-detail {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  padding: 0;
  color: #173c34;
  background: #ffd36a;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.bxx-history-more {
  min-height: 28px;
  border: 1px solid rgba(255, 211, 106, 0.45);
  border-radius: 5px;
  color: #ffd36a;
  background: rgba(255, 211, 106, 0.1);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 850;
  cursor: pointer;
}

.bxx-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
}

.bxx-modal-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #102b30;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.bxx-modal-panel>header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
}

.bxx-modal-panel h2 {
  color: #fff8e1;
  font-size: 1.2rem;
}

.bxx-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bxx-modal-panel>header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #f7fbf6;
  background: rgba(255, 255, 255, 0.09);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.bxx-modal-panel>header .bxx-modal-primary {
  width: auto;
  min-width: 86px;
  padding: 0 12px;
  color: #173c34;
  background: #ffd36a;
  border-color: #ffd36a;
  font-size: 0.78rem;
  font-weight: 850;
}

.bxx-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 0 14px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.42) transparent;
}

.bxx-modal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.bxx-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.bxx-modal-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.bxx-history-hands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bxx-history-hands article {
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.07);
}

.bxx-current-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bxx-current-results article {
  position: relative;
  isolation: isolate;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.bxx-current-results article>* {
  position: relative;
  z-index: 1;
}

.bxx-current-results article.player-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--bxx-border-angle, 0deg),
    #ff3b30,
    #ff9500,
    #ffd60a,
    #34c759,
    #00c7ff,
    #5856d6,
    #bf5af2,
    #ff3b30
  );
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
  animation: bxx-player-border-spin 1.1s linear infinite;
}

@property --bxx-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes bxx-player-border-spin {
  to {
    --bxx-border-angle: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bxx-submit-spinner {
    animation: none;
  }

  .bxx-current-results article.player-panel::before {
    animation: none;
  }
}

.bxx-current-results article>header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.bxx-current-results h3 {
  color: #fff8e1;
  font-size: 0.9rem;
}

.bxx-current-results article>header span {
  color: #b9d3c8;
  font-size: 0.68rem;
  font-weight: 800;
}

.bxx-current-results article>header strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffd36a;
  font-size: 0.92rem;
  font-weight: 950;
  white-space: nowrap;
}

.bxx-result-trend {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff8e1;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
}

.bxx-result-trend.win {
  background: #18a058;
  box-shadow: 0 0 10px rgba(24, 160, 88, 0.38);
}

.bxx-result-trend.loss {
  background: #d64545;
  box-shadow: 0 0 10px rgba(214, 69, 69, 0.38);
}

.bxx-current-hand {
  display: grid;
  gap: 5px;
  border-radius: 7px;
  padding: 7px;
  background: rgba(0, 0, 0, 0.12);
}

.bxx-current-hand+.bxx-seat-results {
  margin-top: 8px;
}

.bxx-history-hands h3 {
  margin-bottom: 8px;
  color: #fff8e1;
  font-size: 0.88rem;
}

.bxx-history-lane {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.bxx-history-lane>span {
  color: #b9d3c8;
  font-size: 0.68rem;
  font-weight: 800;
}

.bxx-history-lane div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bxx-results {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.bxx-result-table-wrap {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bxx-result-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.bxx-result-table th,
.bxx-result-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 9px;
  color: #dbeae4;
  text-align: left;
  white-space: nowrap;
}

.bxx-result-table thead th {
  color: #b9d3c8;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bxx-result-table tbody th {
  color: #fff8e1;
  font-weight: 850;
}

.bxx-result-table tr:last-child th,
.bxx-result-table tr:last-child td {
  border-bottom: 0;
}

.bxx-result-total {
  color: #ffd36a !important;
  font-weight: 900;
  text-align: right !important;
}

.bxx-result-table span {
  border-radius: 999px;
  padding: 3px 8px;
  color: #dbeae4;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.74rem;
}

.bxx-hand {
  min-height: 0;
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.bxx-hand>div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.bxx-hand-sort {
  min-height: 26px;
  border: 1px solid rgba(255, 211, 106, 0.42);
  border-radius: 5px;
  padding: 0 8px;
  color: #ffd36a;
  background: rgba(255, 211, 106, 0.1);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.bxx-hand-sort:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.bxx-hand-actions {
  display: flex;
  gap: 6px;
}

.bxx-hand-fill {
  width: 30px;
  padding: 0;
}

.bxx-hand-fill svg {
  display: block;
  width: 16px;
  height: 16px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bxx-hint {
  flex: 1 1 100%;
  text-align: right;
  font-size: 0.68rem;
}

.bxx-mini-lane {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.bxx-mini-lane>span {
  color: #b9d3c8;
  font-size: 0.72rem;
}

.bxx-mini-lane div {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.bxx-seat-results {
  display: grid;
  gap: 2px;
  margin-top: 5px;
}

.bxx-seat-results>span {
  border-radius: 999px;
  min-height: 18px;
  padding: 3px 9px;
  color: #dbeae4;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.2;
}

.bxx-seat-result {
  display: grid;
  grid-template-columns: 68px repeat(3, minmax(34px, 1fr)) 44px;
  gap: 3px;
  align-items: center;
  border-radius: 6px;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.12);
}

.bxx-seat-result.empty {
  opacity: 0.54;
}

.bxx-seat-result h4 {
  color: #fff8e1;
  font-size: 0.68rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bxx-seat-result span {
  display: inline-block;
  border-radius: 5px;
  padding: 2px 4px;
  color: #b9d3c8;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
}

.bxx-seat-result strong {
  color: #ffd36a;
  font-size: 0.72rem;
  text-align: right;
}

.bxx-seat-result p {
  grid-column: 1 / -1;
  color: #dbeae4;
  font-size: 0.6rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bxx-player-result {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.bxx-player-result span {
  border-radius: 999px;
  padding: 4px 9px;
  color: #dbeae4;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.74rem;
  font-weight: 750;
}

@media (max-width: 900px) {
  body:has(.bxx-game) {
    overflow: auto;
  }

  .bxx-game {
    min-height: 100dvh;
    height: auto;
    padding: 8px;
    overflow: visible;
  }

  .bxx-topbar,
  .bxx-seat-grid,
  .bxx-player-layout,
  .bxx-hand>div:first-child {
    display: grid;
  }

  .bxx-seat-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "center"
      "left"
      "top"
      "right"
      "player";
    height: auto;
    gap: 6px;
  }

  .bxx-table {
    overflow: visible;
  }

  .bxx-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 8px 10px;
  }

  .bxx-topbar h1 {
    font-size: 1.18rem;
  }

  .bxx-kicker {
    font-size: 0.62rem;
  }

  .bxx-version {
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bxx-room-toggle {
    display: inline-grid;
    place-items: center;
    min-height: 36px;
    border: 1px solid rgba(255, 211, 106, 0.48);
    border-radius: 6px;
    padding: 0 12px;
    color: #173c34;
    background: #ffd36a;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 850;
  }

  .bxx-room-form {
    display: none;
    grid-column: 1 / -1;
    gap: 6px;
  }

  .bxx-game.room-controls-open .bxx-room-form {
    display: grid;
  }

  .bxx-room-form {
    grid-template-columns: 1fr;
  }

  .bxx-room-form button {
    min-height: 38px;
  }

  .bxx-room-form p {
    display: none;
  }

  .bxx-center-panel {
    grid-template-columns: 1fr;
    height: auto;
    padding: 9px;
  }

  .bxx-info-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 6px;
  }

  .bxx-info-panel>div:nth-child(2) {
    min-width: 0;
    text-align: left;
  }

  .bxx-score {
    font-size: 1.35rem;
  }

  .bxx-history-toggle {
    display: inline-grid;
    place-items: center;
    min-height: 34px;
    border: 1px solid rgba(255, 211, 106, 0.48);
    border-radius: 6px;
    padding: 0 10px;
    color: #ffd36a;
    background: rgba(255, 211, 106, 0.1);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 850;
  }

  .bxx-history {
    display: none;
  }

  .bxx-game.history-open .bxx-history {
    display: grid;
  }

  .bxx-history>div {
    max-height: 140px;
  }

  .bxx-chat-panel {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 8px;
    padding-left: 0;
  }

  .bxx-chat-messages {
    max-height: 160px;
  }

  .bxx-chat-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bxx-chat-form button[type="button"] {
    display: none;
  }

  .bxx-player-layout,
  .bxx-opponents {
    grid-template-columns: 1fr;
  }

  .bxx-player-layout {
    overflow: visible;
  }

  .bxx-hand {
    order: -1;
  }

  .bxx-seat-player>.bxx-seat {
    overflow: visible;
  }

  .bxx-seat-head {
    gap: 8px;
  }

  .bxx-seat-head strong,
  .bxx-seat-head span {
    font-size: 0.88rem;
  }

  .bxx-card-backs {
    grid-template-columns: repeat(13, minmax(10px, 1fr));
  }

  .bxx-card-backs span {
    height: 34px;
  }

  .bxx-history-hands,
  .bxx-current-results {
    grid-template-columns: 1fr;
  }

  .bxx-actions {
    justify-content: stretch;
    gap: 6px;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 6px 0;
    background: rgba(11, 41, 36, 0.92);
    backdrop-filter: blur(10px);
  }

  .bxx-actions button {
    flex: 1 1 96px;
    min-height: 40px;
    padding: 0 10px;
  }

  .bxx-actions .bxx-icon-button {
    flex: 0 0 40px;
  }

  .bxx-actions .bxx-reset-action {
    margin-left: auto;
  }

  .bxx-hint {
    text-align: left;
  }

  .bxx-hand>div:first-child {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .bxx-hand>div:first-child .bxx-hint {
    grid-column: 1 / -1;
  }

  .bxx-lanes,
  .bxx-hand {
    overflow: visible;
  }

  .bxx-modal {
    padding: 8px;
  }

  .bxx-modal-panel {
    max-height: calc(100dvh - 16px);
  }

  .bxx-modal-panel>header {
    padding: 10px;
  }

  .bxx-modal-body {
    padding: 0 10px 10px;
  }
}

@media (max-width: 520px) {

  .bxx-slot,
  .bxx-card {
    width: 44px;
    height: 62px;
    font-size: 0.78rem;
  }

  .bxx-card span:last-child {
    font-size: 1rem;
  }

  .bxx-lane {
    min-height: 96px;
  }
}

@media (max-width: 380px) {

  .bxx-slot,
  .bxx-card {
    width: 40px;
    height: 56px;
    font-size: 0.72rem;
  }

  .bxx-card span:last-child {
    font-size: 0.9rem;
  }

  .bxx-actions button {
    flex-basis: 82px;
    padding: 0 8px;
  }

  .bxx-actions .bxx-icon-button {
    flex-basis: 38px;
  }
}
