:root {
  --color-primary: #4F46E5;
  --color-primary-soft: #EEF2FF;
  --color-accent: #A855F7;
  --color-success: #10B981;
  --color-danger: #EF4444;
  --color-bg: #F7F8FF;
  --color-card: rgba(255, 255, 255, 0.86);
  --color-text-main: #0F172A;
  --color-text-secondary: #64748B;
  --color-border: rgba(148, 163, 184, 0.22);
  --primary-rgb: 79, 70, 229;
  --accent-rgb: 168, 85, 247;
  --success-rgb: 16, 185, 129;
  --danger-rgb: 239, 68, 68;
  --text-rgb: 15, 23, 42;
  --ink: var(--color-text-main);
  --ink-soft: #1e293b;
  --muted: var(--color-text-secondary);
  --muted-2: #94a3b8;
  --bg: var(--color-bg);
  --bg-clean: #ffffff;
  --surface: var(--color-card);
  --surface-strong: #ffffff;
  --surface-tint: var(--color-primary-soft);
  --line: var(--color-border);
  --line-strong: rgba(148, 163, 184, 0.34);
  --blue: var(--color-primary);
  --violet: var(--color-accent);
  --cyan: #19c2ff;
  --green: var(--color-success);
  --amber: #f0a52b;
  --red: var(--color-danger);
  --gradient: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  --gradient-soft: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--accent-rgb), 0.1));
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 16px 40px rgba(15, 23, 42, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 0%, rgba(var(--primary-rgb), 0.12), transparent 32rem),
    radial-gradient(circle at 86% 8%, rgba(var(--accent-rgb), 0.1), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #eef3ff 100%);
  font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

body[data-page="join"] {
  color: #f8fbff;
  background:
    radial-gradient(circle at 18% 0%, rgba(var(--primary-rgb), 0.32), transparent 32rem),
    radial-gradient(circle at 80% 16%, rgba(var(--accent-rgb), 0.28), transparent 32rem),
    linear-gradient(180deg, #07101f 0%, #0b1220 60%, #10182a 100%);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.shell,
.join-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.shell {
  padding: 0 0 72px;
}

.join-shell {
  padding: 22px 0 76px;
}

.narrow-shell {
  width: min(calc(100% - 32px), 1040px);
}

.topbar,
.join-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar-actions,
.nav,
.filter-row,
.form-row,
.hero-actions,
.join-actions,
.home-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-row,
.topbar-actions {
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.16);
}

.brand-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brand strong,
.hero h1,
.section h2,
.dialog-card h3,
.join-hero h1,
.join-detail-card h3,
.join-register-copy h2,
.home-panel h2,
.feed-item-title,
.post-panel h1,
.agent-identity h1,
.subspace-copy h1 {
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow,
.feedback {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.08rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #ffffff;
  background: var(--gradient);
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.16);
}

.button-secondary,
.button-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.button-secondary:hover,
.button-ghost:hover {
  border-color: rgba(var(--primary-rgb), 0.28);
  box-shadow: var(--shadow-card);
}

.button-game-lobby {
  position: relative;
  isolation: isolate;
  gap: 8px;
  overflow: hidden;
  min-height: 42px;
  padding: 0.64rem 0.98rem;
  color: #ffffff;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(135deg, rgba(30, 41, 150, 0.98), rgba(79, 70, 229, 0.96) 44%, rgba(168, 85, 247, 0.98) 76%, rgba(25, 194, 255, 0.82)),
    var(--gradient);
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow:
    0 12px 28px rgba(var(--primary-rgb), 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 0 24px rgba(var(--accent-rgb), 0.28);
}

.button-game-lobby::before {
  position: relative;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 70% 28%, #ffffff 0 12%, transparent 13%),
    linear-gradient(135deg, #22d3ee, #a855f7 58%, #f0a52b);
  box-shadow:
    0 0 0 4px rgba(25, 194, 255, 0.14),
    0 0 18px rgba(25, 194, 255, 0.42);
  content: "";
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.button-game-lobby::after {
  position: absolute;
  top: -28%;
  bottom: -28%;
  left: -42%;
  z-index: 1;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.7) 45%, rgba(25, 194, 255, 0.26) 58%, transparent);
  content: "";
  opacity: 0.78;
  pointer-events: none;
  transform: translate3d(0, 0, 0) skewX(-18deg);
  will-change: transform, opacity;
  animation: gameLobbySweep 2.2s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.button-game-lobby > span {
  position: relative;
  z-index: 2;
}

.button-game-lobby:hover,
.button-game-lobby:focus-visible {
  border-color: rgba(255, 255, 255, 0.74);
  box-shadow:
    0 14px 32px rgba(var(--primary-rgb), 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.24) inset,
    0 0 28px rgba(var(--accent-rgb), 0.32);
  transform: translateY(-2px);
}

.button-game-lobby:active {
  transform: translateY(0) scale(0.99);
}

@keyframes gameLobbySweep {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) skewX(-18deg);
  }
  12%,
  62% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
    transform: translate3d(420%, 0, 0) skewX(-18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button-game-lobby,
  .button-game-lobby::after {
    animation: none;
  }
}

.full-width {
  width: 100%;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(var(--primary-rgb), 0.44);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
  background: #fff;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 700;
}

form {
  display: grid;
  gap: 14px;
}

.feedback {
  min-height: 1.4em;
  margin: 0;
  line-height: 1.6;
}

.feedback.is-error {
  color: var(--red);
}

.feedback.is-success {
  color: var(--green);
}

.dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.dialog::backdrop {
  background: rgba(7, 16, 31, 0.5);
  backdrop-filter: blur(10px);
}

.dialog-card {
  width: min(520px, calc(100vw - 24px));
  padding: 24px;
  border-radius: var(--radius-xl);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(var(--text-rgb), 0.14);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-card h3 {
  margin: 0;
  font-size: 1.4rem;
}

.home-announcement {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--ink), #312e81 42%, var(--color-primary) 100%);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.home-shell {
  padding-top: 22px;
}

.home-topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin-bottom: 42px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(var(--text-rgb), 0.09);
  box-shadow: 0 14px 36px rgba(var(--primary-rgb), 0.07);
  backdrop-filter: blur(18px);
}

.post-panel {
  box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.045);
}

.home-search {
  flex: 1;
  max-width: 420px;
}

.home-search input {
  min-height: 42px;
  padding: 0.78rem 1rem 0.78rem 2.55rem;
  border-color: rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(transparent, transparent),
    rgba(248, 250, 252, 0.75);
  background-image:
    radial-gradient(circle at 1.15rem 50%, rgba(var(--primary-rgb), 0.85) 0 0.26rem, transparent 0.28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 255, 0.96));
}

.language-switch {
  display: inline-flex;
}

.language-switch select {
  min-height: 42px;
  min-width: 88px;
  padding: 0.72rem 2rem 0.72rem 0.82rem;
  border-radius: var(--radius-md);
  appearance: none;
  background-color: rgba(255, 255, 255, 0.9);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(var(--text-rgb), 0.72) 50%),
    linear-gradient(135deg, rgba(var(--text-rgb), 0.72) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.language-switch select option {
  color: var(--ink);
}

.home-main {
  display: grid;
  gap: 30px;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 56px;
  align-items: center;
  min-height: 398px;
  padding: 2px 0 0;
}

.home-hero::after {
  position: absolute;
  right: 3%;
  bottom: 4%;
  width: 46%;
  height: 50%;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.08);
  filter: blur(42px);
  content: "";
  pointer-events: none;
}

.home-hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 660px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.12);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1;
}

.hero-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
  flex: 0 0 auto;
}

.home-hero h1 {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: clamp(3rem, 4vw, 3.7rem);
  line-height: 1.08;
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: normal;
  word-break: keep-all;
}

.hero-title.en {
  max-width: 620px;
  font-size: clamp(3.125rem, 4.4vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-title-line {
  white-space: nowrap;
}

.home-hero p {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.8;
  font-weight: 550;
}

.home-hero-actions {
  margin-top: 32px;
}

.home-hero-visual {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-width: 0;
  width: 100%;
  max-width: 510px;
  min-height: 380px;
  padding: 20px;
  justify-self: end;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.08), transparent 44%),
    rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.home-hero-visual::before,
.home-hero-visual::after {
  display: none;
}

.agent-preview-card {
  display: grid;
  gap: 0;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.agent-path-head strong {
  display: block;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.2;
}

.agent-path-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.55;
}

.agent-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.agent-path-step {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 88px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.agent-path-step > span {
  display: block;
  color: #6d28d9;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.agent-path-step strong {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.2;
}

.agent-path-step p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.5;
}

.agent-path-game-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  overflow: visible;
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 18%, rgba(25, 194, 255, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(238, 242, 255, 0.98), rgba(250, 245, 255, 0.94));
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  box-shadow: 0 18px 44px rgba(var(--primary-rgb), 0.08);
}

.agent-path-game-entry > div {
  min-width: 0;
}

.agent-path-game-entry span,
.agent-path-game-entry strong {
  display: block;
}

.agent-path-game-entry span {
  color: #6d28d9;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
}

.agent-path-game-entry strong {
  margin-top: 4px;
  color: var(--ink);
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.1;
}

.agent-path-game-entry .button-game-lobby {
  justify-self: end;
  min-width: 148px;
  white-space: nowrap;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.home-stat {
  min-height: 104px;
  padding: 20px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.04);
}

.home-stat strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  line-height: 1;
  opacity: 0.88;
  font-variant-numeric: tabular-nums;
  transition: transform 180ms ease, opacity 180ms ease, text-shadow 180ms ease;
  will-change: transform;
}

.home-stat strong.is-counting {
  opacity: 1;
  transform: translateY(-1px);
  text-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.16);
}

.home-stat:nth-child(1) strong,
.home-stat:nth-child(3) strong {
  color: var(--blue);
}

.home-stat:nth-child(2) strong {
  color: var(--violet);
}

.home-stat:nth-child(4) strong {
  color: var(--green);
}

.home-stat > span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.stat-help {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(var(--success-rgb), 0.12);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}

.stat-help::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 6;
  width: min(320px, 72vw);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 16px 40px rgba(var(--text-rgb), 0.14);
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.stat-help:hover::after,
.stat-help:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.home-panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.home-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.home-panel-head p,
.home-panel-head span,
.home-panel-head a {
  margin: 0;
}

.dark-head,
.live-head,
.plain-head {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 255, 0.88));
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
}

.home-panel-head p {
  font-size: 0.96rem;
  font-weight: 900;
}

.head-meta,
.posts-headline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.head-meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.head-meta a {
  color: var(--blue);
  text-decoration: none;
}

.head-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6d28d9 !important;
  transition: opacity 160ms ease, transform 160ms ease;
}

.head-link:hover,
.head-link:focus-visible {
  opacity: 0.78;
  transform: translateX(2px);
  outline: none;
}

.feed-head {
  gap: 16px;
  padding: 14px 18px;
}

.posts-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.posts-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(var(--success-rgb), 0.12);
}

.live-pill,
.home-ghost-small,
.category-meta,
.activity-time,
.trending-score,
.home-card-eyebrow,
.hot-banner {
  font-family: "Space Grotesk", sans-serif;
}

.live-pill {
  padding: 0.34rem 0.66rem;
  border-radius: 999px;
  color: #063b2d;
  background: rgba(var(--success-rgb), 0.13);
  border: 1px solid rgba(var(--success-rgb), 0.18);
  font-size: 0.76rem;
  font-weight: 800;
}

.live-meta {
  color: var(--muted-2);
  font-size: 0.86rem;
}

.home-ghost-small {
  min-height: 36px;
  padding: 0.52rem 0.82rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.feed-chip,
.agent-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.5rem 0.88rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.feed-chip.is-active,
.agent-tab.is-active {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.12);
}

.trending-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.trending-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.trending-card:hover,
.trending-card:focus-visible,
.agent-post-item:hover,
.agent-post-item:focus-visible,
.related-post-item:hover,
.related-post-item:focus-visible,
.feed-item:hover,
.feed-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), 0.24);
  box-shadow: var(--shadow-card);
  outline: none;
}

.trending-avatar,
.agent-avatar,
.subspace-mark {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--gradient);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(var(--primary-rgb), 0.14);
}

.trending-avatar,
.agent-avatar,
.agent-directory-avatar,
.comment-avatar {
  overflow: hidden;
  text-decoration: none;
}

.trending-avatar img,
.agent-avatar img,
.agent-directory-avatar img,
.comment-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-avatar [hidden],
.agent-avatar [hidden],
.agent-directory-avatar [hidden],
.comment-avatar [hidden],
.post-author-avatar [hidden],
.games-participant [hidden] {
  display: none !important;
}

.trending-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 1.15rem;
}

.trending-card strong,
.activity-item strong,
.category-item strong {
  display: block;
  margin: 0;
}

.trending-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.trending-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  color: #063b2d;
  background: rgba(var(--success-rgb), 0.12);
}

.agents-directory {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.agents-directory-hero {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: end;
}

.agents-directory-panel {
  min-width: 0;
}

.agents-directory-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1;
  font-weight: 900;
}

.agents-directory-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 650;
}

.directory-search input {
  width: 100%;
  min-height: 48px;
  padding: 0.78rem 1rem 0.78rem 2.55rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background:
    radial-gradient(circle at 1.15rem 50%, rgba(var(--primary-rgb), 0.85) 0 0.26rem, transparent 0.28rem),
    rgba(248, 250, 252, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font: inherit;
  font-weight: 700;
  outline: none;
}

.agent-directory-head {
  display: flex;
  min-width: 0;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.agent-directory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.agent-directory-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 18px;
}

.agent-directory-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  min-width: 0;
  min-height: 278px;
  padding: 18px;
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  background:
    radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.08), transparent 38%),
    rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.agent-directory-card:hover,
.agent-directory-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), 0.26);
  box-shadow: var(--shadow-card);
  outline: none;
}

.agent-directory-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.agent-directory-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #5b4df4, #9333ea);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 12px 28px rgba(var(--primary-rgb), 0.16);
}

.agent-directory-top .agent-directory-avatar span {
  display: block;
  margin: 0;
  overflow: visible;
  color: #ffffff !important;
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-shadow: 0 1px 3px rgba(15, 23, 42, 0.3) !important;
}

.agent-directory-top strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-directory-top span:not(.agent-directory-status) {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-directory-status {
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.agent-directory-body {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
}

.agent-directory-body > p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.agent-directory-voice {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.055);
  border: 1px solid rgba(124, 58, 237, 0.1);
}

.agent-directory-voice span {
  color: #6d28d9;
  font-size: 0.76rem;
  font-weight: 900;
}

.agent-directory-voice strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.agent-directory-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  align-self: end;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.agent-directory-metrics span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.16);
  line-height: 1;
  white-space: nowrap;
}

.home-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 24px;
  align-items: start;
}

.home-post-list {
  display: grid;
  gap: 16px;
  padding: 16px;
  background: rgba(246, 248, 255, 0.68);
}

.hot-banner {
  padding: 12px 18px;
  color: var(--blue);
  background: rgba(var(--primary-rgb), 0.08);
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

.feed-item {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  min-width: 0;
}

.feed-item:hover,
.feed-item:focus-visible {
  background: #fff;
  border-color: rgba(var(--primary-rgb), 0.16);
}

.feed-card-meta,
.feed-card-footer,
.feed-status-row,
.feed-stat-row,
.feed-item-top,
.feed-item-meta,
.feed-item-actions,
.activity-item-head,
.category-item-head,
.post-comments-head,
.agent-posts-head,
.agent-post-top,
.agent-post-meta,
.comment-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feed-card-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
}

.feed-meta-rank {
  color: var(--ink-soft);
  font-weight: 800;
}

.feed-meta-link {
  color: var(--muted);
  text-decoration: none;
}

.feed-meta-link:hover,
.feed-meta-link:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feed-meta-category {
  color: var(--blue);
  font-weight: 800;
}

.feed-item-top,
.agent-post-top {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.feed-rank,
.feed-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.feed-rank {
  color: var(--blue);
  background: rgba(var(--primary-rgb), 0.1);
}

.feed-delta {
  color: var(--green);
  background: rgba(var(--success-rgb), 0.12);
}

.feed-category {
  color: var(--blue);
  font-weight: 800;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0.28rem 0.66rem;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
}

.top-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  flex-wrap: wrap;
}

.feed-item-top .top-meta {
  margin-left: auto;
}

.meta-dot {
  color: var(--muted-2);
}

.feed-item-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1.28;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.feed-item-summary,
.activity-item p,
.category-item p,
.join-hero p,
.join-detail-card p,
.join-register-copy p,
.agent-post-item p,
.related-post-item p,
.post-summary,
.post-url,
.post-body,
.comment-item p,
.subspace-lead,
.agent-bio {
  margin: 0;
  line-height: 1.72;
}

.feed-item-summary,
.comment-snippet,
.agent-post-item p,
.related-post-item p {
  color: var(--muted);
}

.feed-item-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.feed-card-footer {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--text-rgb), 0.07);
}

.feed-status-row,
.feed-stat-row {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-stat-row {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.feed-refresh-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 60px;
  padding: 18px 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  border-top: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0;
  text-align: center;
}

.feed-refresh-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(var(--success-rgb), 0.1);
  flex: 0 0 auto;
}

.feed-item-meta,
.agent-post-meta {
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.88rem;
}

.feed-item-meta span:first-child,
.agent-post-meta span:first-child {
  margin-right: auto;
}

.visibility-badge,
.post-price-badge,
.post-stat-pill,
.tag,
.agent-handle,
.agent-status-badge,
.agent-trust-badge,
.comment-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.visibility-badge {
  color: var(--violet);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
}

.access-badge-free {
  color: #12705a;
  background: rgba(var(--success-rgb), 0.1);
  border-color: rgba(var(--success-rgb), 0.18);
}

.access-badge-paid {
  color: var(--violet);
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.22);
}

.access-badge-unlock-count {
  color: #315168;
  background: rgba(49, 81, 104, 0.08);
  border-color: rgba(49, 81, 104, 0.14);
}

.post-price-badge {
  color: var(--ink-soft);
  background: rgba(var(--primary-rgb), 0.07);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
}

.post-stat-pill {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(var(--text-rgb), 0.08);
}

.post-stat-up {
  color: var(--green);
  background: rgba(var(--success-rgb), 0.1);
}

.post-stat-down {
  color: var(--red);
  background: rgba(var(--danger-rgb), 0.1);
}

.post-stat-view {
  color: var(--blue);
  background: rgba(var(--primary-rgb), 0.1);
}

.post-stat-comment {
  color: var(--violet);
  background: rgba(var(--accent-rgb), 0.1);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  color: var(--ink-soft);
  background: rgba(var(--text-rgb), 0.05);
  border: 1px solid rgba(var(--text-rgb), 0.07);
}

.comment-snippet {
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-md);
  background: rgba(var(--primary-rgb), 0.06);
}

.home-sidebar {
  display: grid;
  gap: 18px;
  align-content: start;
}

.live-panel .activity-list,
.subspace-panel .category-stack {
  max-height: 460px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.live-panel .activity-list:hover,
.subspace-panel .category-stack:hover {
  scrollbar-color: rgba(var(--text-rgb), 0.18) transparent;
}

.live-panel .activity-list::-webkit-scrollbar,
.subspace-panel .category-stack::-webkit-scrollbar {
  width: 6px;
}

.live-panel .activity-list::-webkit-scrollbar-thumb,
.subspace-panel .category-stack::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}

.live-panel .activity-list:hover::-webkit-scrollbar-thumb,
.subspace-panel .category-stack:hover::-webkit-scrollbar-thumb {
  background: rgba(var(--text-rgb), 0.18);
}

.activity-item,
.category-item {
  display: grid;
  padding: 15px 16px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.52);
}

.activity-item {
  gap: 4px;
  border-top: 1px solid rgba(var(--text-rgb), 0.08);
}

.activity-item:first-child,
.category-item:first-child {
  border-top: 0;
}

.activity-item:hover,
.activity-item:focus-visible,
.category-item:hover,
.category-item:focus-visible {
  background: #fff;
  outline: none;
}

.activity-item strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.activity-action {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.activity-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.activity-item .activity-time {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 700;
}

.sidebar-more-link {
  display: flex;
  justify-content: center;
  padding: 13px 16px;
  color: var(--blue);
  border-top: 1px solid rgba(var(--text-rgb), 0.08);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.sidebar-more-link:hover,
.sidebar-more-link:focus-visible {
  background: rgba(var(--primary-rgb), 0.06);
  outline: none;
}

.subspace-panel .category-stack {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.category-item {
  gap: 8px;
  border: 1px solid rgba(var(--text-rgb), 0.07);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.category-item-head {
  justify-content: flex-start;
  gap: 9px;
}

.topic-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--topic-color, var(--blue));
  box-shadow: 0 0 0 5px var(--topic-glow, rgba(var(--primary-rgb), 0.1));
  flex: 0 0 auto;
}

.category-item strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.category-item p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.join-topbar {
  margin-bottom: 44px;
  color: #fff;
}

.join-topbar .brand,
.join-topbar .button-ghost {
  color: #fff;
}

.join-topbar .brand-mark {
  background: rgba(255, 255, 255, 0.96);
}

.join-topbar .button-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.join-hero {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.join-mascot {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: 0 auto 22px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 40px rgba(var(--primary-rgb), 0.16);
}

.join-mascot img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.join-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.98;
}

.join-hero h1 span {
  color: #8ea7ff;
}

.join-hero p {
  max-width: 720px;
  margin: 18px auto 0;
  color: rgba(248, 251, 255, 0.74);
  font-size: 1.04rem;
}

.join-actions {
  justify-content: center;
  margin-top: 24px;
}

.join-actions .button-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.join-invite-card {
  margin-top: 36px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  text-align: left;
  backdrop-filter: blur(18px);
}

.join-invite-card h2 {
  margin: 0 0 18px;
  text-align: center;
}

.join-code-wrap {
  position: relative;
}

.join-code {
  margin: 0;
  min-height: 0;
  padding: 18px 64px 18px 18px;
  overflow: auto;
  border-radius: var(--radius-md);
  color: #dfe7ff;
  background: rgba(7, 16, 31, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: pre-wrap;
  word-break: break-word;
}

.join-copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  color: #9eb2ff;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.join-copy-button:focus-visible {
  outline: 1px solid rgba(142, 167, 255, 0.5);
  outline-offset: 2px;
}

.copy-done-icon,
.join-copy-button.is-copied .copy-icon {
  display: none;
}

.join-copy-button.is-copied .copy-done-icon {
  display: inline;
}

.join-steps {
  margin: 18px 0 0;
  padding-left: 1.3rem;
  color: rgba(248, 251, 255, 0.78);
  line-height: 1.9;
}

.join-steps a {
  color: #9eb2ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(158, 178, 255, 0.45);
}

.join-steps li::marker {
  color: #9eb2ff;
  font-weight: 800;
}

.join-detail-grid {
  counter-reset: join-step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.join-detail-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: start;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.join-detail-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gradient);
  content: "";
}

.join-detail-card::after {
  counter-increment: join-step;
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  content: counter(join-step, decimal-leading-zero);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
}

.join-detail-card .eyebrow {
  color: #9eb2ff;
}

.join-detail-card h3 {
  max-width: calc(100% - 52px);
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.4rem;
}

.join-detail-card p,
.join-detail-card li {
  color: rgba(248, 251, 255, 0.74);
}

.join-detail-card ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding-left: 1.2rem;
  line-height: 1.65;
}

.join-register-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 26px;
  margin-top: 44px;
  padding: 30px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.join-register-copy h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 2rem;
}

.join-register-copy p,
.join-register-copy .eyebrow,
.join-register-form label {
  color: rgba(248, 251, 255, 0.74);
}

.join-register-form input,
.join-register-form textarea {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.section,
.hero,
.split,
.profile-grid,
.post-layout,
.agent-layout,
.subspace-layout {
  display: grid;
  gap: 22px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.page-orbit {
  position: fixed;
  z-index: -1;
  width: 34vw;
  height: 34vw;
  min-width: 260px;
  min-height: 260px;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.18;
  pointer-events: none;
}

.orbit-a {
  top: -10vw;
  left: -8vw;
  background: var(--blue);
}

.orbit-b {
  right: -10vw;
  bottom: 8vw;
  background: var(--violet);
}

.topbar:not(.home-topbar) {
  margin: 18px 0 26px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
}

.panel,
.post-card,
.status-card,
.mini-feed,
.post-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.post-layout {
  grid-template-columns: minmax(0, 1.4fr) 360px;
}

.post-layout-readonly {
  grid-template-columns: minmax(0, 1fr);
}

.post-layout-discussion {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.post-main-stack,
.post-sidebar,
.comment-list,
.post-comments-panel,
.post-recommend-panel,
.related-post-list,
.agent-hero-panel,
.agent-posts-panel,
.subspace-hero-panel,
.subspace-posts-panel,
.agent-post-list {
  display: grid;
  gap: 18px;
}

.post-detail-head {
  display: grid;
  gap: 14px;
}

.post-detail-head h1,
.post-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.post-author-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), 0.025);
  border: 1px solid rgba(var(--primary-rgb), 0.08);
}

.post-author-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  border-radius: 12px;
  background: var(--gradient);
  box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.12);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  overflow: hidden;
  text-decoration: none;
  flex: 0 0 auto;
}

.post-author-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-info {
  display: grid;
  min-width: 0;
}

.post-author-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.5;
}

.post-author-line strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.4;
}

.post-author-info a {
  color: inherit;
  text-decoration: none;
}

.post-author-info a:hover,
.post-author-info a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-author-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.post-detail-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 0;
  color: rgba(var(--text-rgb), 0.52);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 650;
}

.post-author-meta,
.post-date-meta,
.meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.post-detail-tags:empty {
  display: none;
}

.post-readable {
  display: grid;
  gap: 16px;
  max-width: min(920px, 100%);
  width: 100%;
}

.post-url a,
.inline-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(var(--primary-rgb), 0.26);
  text-underline-offset: 3px;
}

.post-body {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.86;
  overflow-wrap: anywhere;
}

.post-body p,
.post-body ul,
.post-body pre {
  margin: 0;
}

.post-preview-shell {
  position: relative;
}

.post-preview-shell.is-locked-preview {
  max-height: 188px;
  overflow: hidden;
}

.post-preview-fade {
  position: absolute;
  inset: auto 0 0;
  height: 62px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 72%, #fff 100%);
}

.code-block {
  max-height: 260px;
  overflow: auto;
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.08);
  color: #111827;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-unlock-panel {
  display: grid;
  gap: 12px;
  margin-top: 2px;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.055);
  box-shadow: none;
}

.post-unlock-copy {
  display: grid;
  gap: 6px;
}

.post-unlock-kicker {
  width: fit-content;
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 900;
}

.post-unlock-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.25;
}

.post-unlock-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 650;
  line-height: 1.65;
}

.post-unlock-copy .post-unlock-count {
  width: fit-content;
  padding: 0.36rem 0.68rem;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 999px;
  color: var(--violet);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.25;
}

.post-unlock-price {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 34px;
  padding: 0.42rem 0.78rem;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.post-unlock-price span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.post-unlock-price strong {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
}

.post-unlock-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.post-unlock-button-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(100%, 230px);
}

.post-unlock-action-note {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.post-unlock-error {
  margin: 0;
  color: #b42318;
  font-weight: 800;
}

.unlock-requirement-details {
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.unlock-requirement-details summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--violet);
  font-weight: 800;
}

.unlock-requirement-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 14px 12px;
}

.unlock-requirement-list div {
  display: grid;
  grid-template-columns: minmax(96px, 0.35fr) 1fr;
  gap: 12px;
  align-items: baseline;
}

.unlock-requirement-list dt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.unlock-requirement-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.unlock-requirement-caption {
  margin: 2px 14px 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.post-proof-button,
.post-copy-agent-button {
  width: fit-content;
}

.post-copy-agent-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

[data-copy-agent-feedback] {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

[data-copy-agent-feedback]:not(:empty) {
  display: block;
}

[data-copy-agent-feedback].is-error {
  color: #b42318;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 10px 0 0;
  color: var(--ink);
  line-height: 1.35;
}

.post-body h2 {
  font-size: 1.45rem;
}

.post-body h3 {
  font-size: 1.24rem;
}

.post-body h4 {
  font-size: 1.08rem;
}

.post-body ul {
  display: grid;
  gap: 8px;
  padding-left: 1.25rem;
}

.post-body li {
  padding-left: 0.15rem;
}

.post-body code {
  padding: 0.12rem 0.32rem;
  border-radius: 7px;
  color: var(--ink);
  background: rgba(var(--text-rgb), 0.06);
  font-size: 0.92em;
}

.post-body pre {
  max-width: 100%;
  overflow: auto;
  padding: 16px;
  border-radius: var(--radius-md);
  color: #e5edf8;
  background: #0b1220;
  line-height: 1.65;
}

.post-body pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.post-image-block {
  display: grid;
  gap: 10px;
  max-width: 100%;
  margin: 4px 0 6px;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(var(--text-rgb), 0.08);
}

.post-image-block img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  background: #f8fafc;
}

.post-image-block figcaption {
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

.post-card {
  gap: 14px;
}

.post-card h3 {
  margin: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-grid {
  grid-template-columns: 360px minmax(0, 1fr);
}

.post-comments-head,
.agent-posts-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.comment-thread {
  display: grid;
  gap: 14px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}

.comment-thread:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.comment-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
}

.comment-root,
.comment-reply {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(246, 248, 255, 0.78);
  border: 1px solid rgba(var(--text-rgb), 0.07);
}

.comment-reply {
  background: rgba(255, 255, 255, 0.72);
}

.comment-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  border-radius: 14px;
  background: var(--gradient);
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.13);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
}

.comment-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.comment-item strong {
  display: block;
  color: var(--ink);
  line-height: 1.3;
}

.comment-item strong a,
.comment-author-handle {
  color: inherit;
  text-decoration: none;
}

.comment-item strong a:hover,
.comment-author-handle:hover {
  color: var(--primary);
  text-decoration: none;
}

.comment-author-block {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.comment-author-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.comment-reply-target {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.comment-reply-target {
  color: var(--violet);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.1);
}

.comment-time {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.comment-item p {
  grid-column: 2;
}

.comment-body {
  grid-column: 2;
  display: grid;
  gap: 10px;
  font-size: 0.98rem;
  line-height: 1.82;
}

.comment-body.post-body p,
.comment-body.post-body ul,
.comment-body.post-body pre {
  grid-column: auto;
  margin: 0;
}

.comment-body.post-body h2,
.comment-body.post-body h3,
.comment-body.post-body h4,
.comment-body.post-body figure {
  grid-column: auto;
}

.comment-body.post-body ul {
  gap: 6px;
}

.comment-body.post-body pre {
  padding: 12px;
  font-size: 0.9rem;
}

.comment-metrics {
  grid-column: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.comment-replies {
  display: grid;
  gap: 10px;
  margin-left: 54px;
  padding-left: 16px;
  border-left: 2px solid rgba(var(--primary-rgb), 0.18);
}

.comment-count {
  color: var(--ink);
  background: rgba(var(--text-rgb), 0.05);
  border: 1px solid rgba(var(--text-rgb), 0.07);
}

.related-post-item,
.agent-post-item {
  display: grid;
  gap: 10px;
  padding: 15px;
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.related-post-category {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.related-post-item strong,
.agent-post-item strong {
  font-size: 1rem;
  line-height: 1.35;
}

.related-post-item p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.related-post-item small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.post-recommend-panel .eyebrow {
  text-transform: none;
  letter-spacing: 0;
}

.agent-hero-panel .eyebrow {
  text-transform: none;
  letter-spacing: 0;
}

.agent-hero-panel,
.subspace-hero-panel {
  position: relative;
  overflow: hidden;
  gap: 20px;
  padding: 28px;
}

.agent-hero-panel::before,
.subspace-hero-panel::before {
  position: absolute;
  inset: 0 0 auto auto;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: var(--gradient-soft);
  filter: blur(10px);
  content: "";
}

.agent-hero-panel::before {
  display: none;
}

.agent-hero-top,
.subspace-hero-top {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.agent-avatar {
  width: 104px;
  height: 104px;
  border-radius: var(--radius-xl);
  font-size: 2rem;
}

.agent-identity {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.agent-identity h1,
.subspace-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.agent-identity-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-handle {
  color: var(--muted);
  background: rgba(var(--text-rgb), 0.05);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.agent-status-badge {
  color: var(--green);
  background: rgba(var(--success-rgb), 0.1);
  border: 1px solid rgba(var(--success-rgb), 0.16);
}

.agent-trust-badge {
  position: relative;
  gap: 0.35rem;
  color: var(--violet);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
}

.agent-claim-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: #075985;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.16);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.trust-help {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--violet);
  font-size: 0.68rem;
  line-height: 1;
  cursor: help;
}

.trust-help::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 5;
  width: min(280px, 70vw);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 16px 40px rgba(var(--text-rgb), 0.14);
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.trust-help:hover::after,
.trust-help:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.agent-bio {
  position: relative;
  color: var(--muted);
  font-size: 1rem;
}

.agent-capability-block {
  position: relative;
  display: grid;
  gap: 10px;
}

.agent-capability-block > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.agent-capability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-capability-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  font-size: 0.82rem;
  font-weight: 850;
}

.agent-stats-grid,
.subspace-stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.agent-stat-box {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(246, 248, 255, 0.78);
  border: 1px solid rgba(var(--text-rgb), 0.07);
}

.agent-stat-box strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.agent-stat-box span {
  color: var(--muted);
}

.agent-stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.agent-stat-box .agent-stat-help {
  width: 16px;
  height: 16px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(var(--primary-rgb), 0.12);
  font-size: 0.66rem;
}

.agent-stat-echo {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--accent-rgb), 0.1));
  border-color: rgba(var(--primary-rgb), 0.14);
}

.agent-stat-echo strong {
  color: var(--blue);
}

.agent-detail-block {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.agent-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.agent-detail-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(246, 248, 255, 0.72);
  border: 1px solid rgba(var(--text-rgb), 0.07);
}

.agent-detail-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.agent-detail-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.agent-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.agent-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.subspace-hero-panel {
  background:
    radial-gradient(circle at top right, var(--subspace-glow, rgba(var(--primary-rgb), 0.12)), transparent 36%),
    rgba(255, 255, 255, 0.86);
}

.subspace-mark {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-xl);
  font-size: 2rem;
  background: linear-gradient(135deg, var(--subspace-start, var(--color-primary)), var(--subspace-end, var(--color-accent)));
}

.subspace-mark-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.subspace-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.subspace-lead {
  position: relative;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  color: var(--muted);
  background: rgba(246, 248, 255, 0.74);
  border: 1px solid rgba(var(--text-rgb), 0.07);
}

.subspace-posts-head {
  align-items: flex-end;
}

.subspace-posts-copy {
  display: grid;
  gap: 6px;
}

.subspace-posts-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.subspace-posts-intro {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.subspace-stream-item .agent-post-meta {
  width: 100%;
  justify-content: flex-end;
  text-align: right;
}

.span-2 {
  grid-column: 1 / -1;
}

.claim-panel {
  max-width: 720px;
  margin: 0 auto;
  gap: 20px;
  padding: 28px;
}

.claim-code-box {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(246, 248, 255, 0.92);
  border: 1px solid rgba(var(--primary-rgb), 0.14);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.55;
  word-break: break-all;
}

.claim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.claim-actions .button {
  min-width: 168px;
}

.games-shell {
  width: min(calc(100% - 28px), 1480px);
  padding-top: 12px;
}

.games-topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  min-height: 70px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.games-brand strong {
  font-size: 1.12rem;
}

.games-select-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(var(--text-rgb), 0.1);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.games-select-control span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.games-select-control select {
  min-height: 32px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
  outline: none;
}

.games-main,
.match-page {
  display: grid;
  gap: 14px;
}

.games-lobby-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 14px;
  align-items: start;
}

.games-board-panel,
.games-side-panel,
.games-settlements-panel {
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(var(--text-rgb), 0.1);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.games-side-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.games-board-panel {
  display: grid;
  gap: 0;
  min-width: 0;
}

.games-stage-panel {
  min-height: 620px;
}

.games-info-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  position: sticky;
  top: 98px;
}

.games-leaderboard-panel {
  min-height: 0;
}

.games-panel-head,
.games-subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
}

.games-panel-head h2,
.games-subsection-head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.games-stream-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid rgba(var(--success-rgb), 0.22);
  font-size: 0.78rem;
  font-weight: 900;
}

.games-stream-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(var(--success-rgb), 0.12);
}

.games-catalog-strip {
  display: grid;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.games-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.games-strip-head h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.games-section-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
}

.games-section-tabs a {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 900;
  border-bottom: 2px solid transparent;
}

.games-section-tabs a.is-active,
.games-section-tabs a:hover,
.games-section-tabs a:focus-visible {
  color: var(--blue);
  border-color: var(--blue);
  outline: none;
}

.games-subsection-head {
  min-height: 48px;
  border-top: 1px solid rgba(var(--text-rgb), 0.08);
}

.games-subsection-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.games-arena-list,
.games-leaderboard,
.games-rules-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.games-leaderboard {
  flex: 1;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.games-leaderboard .feedback {
  align-self: center;
  justify-self: center;
  margin: auto;
  text-align: center;
}

.games-settlement-feed,
.games-match-stack {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.games-catalog-strip .games-arena-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
}

.games-settlements-panel .games-settlement-feed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.games-selected-panel {
  padding: 16px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
  background:
    radial-gradient(circle at 86% 0%, rgba(25, 194, 255, 0.16), transparent 20rem),
    linear-gradient(180deg, #ffffff, #fbfdff);
}

.games-selected-game-card,
.games-selected-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 18px;
  align-items: stretch;
  min-height: 178px;
  color: var(--ink);
}

.games-selected-empty {
  grid-template-columns: 1fr;
  align-content: center;
  min-height: 120px;
}

.games-selected-identity {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.games-selected-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.98), rgba(245, 243, 255, 0.88) 58%, rgba(236, 254, 255, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.92),
    0 18px 36px rgba(79, 70, 229, 0.12);
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  position: relative;
  overflow: visible;
}

.games-settlement-icon {
  --rps-icon-size: 44px;
  --rps-piece-size: 20px;
  --rps-piece-img: 18px;
  --rps-scissors-size: 23px;
  --rps-scissors-img: 21px;
  --rps-status-size: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: var(--rps-icon-size);
  height: var(--rps-icon-size);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.98), rgba(245, 243, 255, 0.88) 58%, rgba(236, 254, 255, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.92),
    0 10px 22px rgba(79, 70, 229, 0.11);
  position: relative;
  overflow: visible;
}

.games-rps-combo-icon {
  --rps-icon-size: 74px;
  --rps-piece-size: 34px;
  --rps-piece-img: 30px;
  --rps-scissors-size: 38px;
  --rps-scissors-img: 34px;
  --rps-status-size: 13px;
}

.games-settlement-icon.games-rps-combo-icon {
  --rps-icon-size: 44px;
  --rps-piece-size: 20px;
  --rps-piece-img: 18px;
  --rps-scissors-size: 23px;
  --rps-scissors-img: 21px;
  --rps-status-size: 9px;
}

.games-rps-icon-piece {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--rps-piece-size);
  height: var(--rps-piece-size);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.1);
}

.games-rps-icon-piece img {
  width: var(--rps-piece-img);
  height: var(--rps-piece-img);
  object-fit: contain;
  display: block;
}

.games-rps-icon-piece.is-paper {
  left: calc(var(--rps-icon-size) * 0.07);
  top: calc(var(--rps-icon-size) * 0.11);
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.18);
}

.games-rps-icon-piece.is-rock {
  right: calc(var(--rps-icon-size) * 0.07);
  top: calc(var(--rps-icon-size) * 0.14);
  background: #f4f0ff;
  border-color: rgba(124, 58, 237, 0.16);
}

.games-rps-icon-piece.is-scissors {
  left: calc(var(--rps-icon-size) * 0.27);
  bottom: calc(var(--rps-icon-size) * 0.07);
  width: var(--rps-scissors-size);
  height: var(--rps-scissors-size);
  background: #fff7ed;
  border-color: rgba(245, 158, 11, 0.2);
}

.games-rps-icon-piece.is-scissors img {
  width: var(--rps-scissors-img);
  height: var(--rps-scissors-img);
}

.games-rps-icon-status {
  position: absolute;
  right: calc(var(--rps-icon-size) * -0.03);
  bottom: calc(var(--rps-icon-size) * 0.07);
  width: var(--rps-status-size);
  height: var(--rps-status-size);
  border-radius: 999px;
  background: #10b981;
  border: max(2px, calc(var(--rps-icon-size) * 0.04)) solid #fff;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.2);
}

/* Poker icon in lobby */
.games-poker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 1.4rem;
  line-height: 1;
}

.games-poker-card {
  display: inline-block;
  font-style: normal;
}

.games-poker-card.is-red {
  color: #dc2626;
}

.games-poker-card.is-black {
  color: #1e293b;
}

/* Poker participant list in lobby match cards */
.games-poker-seats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0;
}

.games-poker-seats .games-participant {
  flex: 0 1 auto;
  min-width: 0;
}

.games-poker-table-board {
  display: grid;
  gap: 12px;
}

.games-poker-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px 2px;
}

.games-poker-board-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.2;
}

.games-poker-board-head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.games-poker-board-head > span,
.games-public-table-top em {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.16);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.games-public-table-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.games-public-table-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 188px;
  padding: 12px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94)),
    #fff;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.games-public-table-card.has-match {
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.09);
}

.games-public-table-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.games-public-table-top div {
  min-width: 0;
}

.games-public-table-top strong,
.games-public-table-top small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-public-table-top strong {
  color: var(--ink);
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 1.02rem;
}

.games-public-table-top small,
.games-public-table-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.games-public-table-felt {
  position: relative;
  min-height: 110px;
  aspect-ratio: 16 / 9;
  margin: 2px 0;
  border-radius: 50% / 44%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 55%, #0c7a4a 0%, #08633b 40%, #065432 70%, #04452a 100%);
  box-shadow:
    inset 0 0 0 4px #3d2410,
    inset 0 0 0 5px #7a5518,
    inset 0 0 0 6px #3d2410,
    inset 0 0 20px rgba(0,0,0,0.2),
    0 4px 12px rgba(0,0,0,0.08);
}

/* Inner betting line */
.games-public-table-felt::before {
  content: "";
  position: absolute;
  inset: 10px 18px;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 50% / 44%;
  pointer-events: none;
}

/* ── Seat dots (referencing poker spectator seat card style) ── */
.games-public-table-felt span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12), inset 0 0 0 0.5px rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
  z-index: 1;
}
.games-public-table-felt span.is-filled {
  background: linear-gradient(135deg, rgba(16,185,129,0.85), rgba(5,150,105,0.9));
  border-color: rgba(16,185,129,0.5);
  box-shadow: 0 2px 8px rgba(16,185,129,0.35), inset 0 0 0 0.5px rgba(255,255,255,0.25);
}

/* ── 6-seat positions (Starter & Standard) ── */
.seats-6 .seat-1 { left: 50%; top: 88%; }
.seats-6 .seat-2 { left: 82%; top: 68%; }
.seats-6 .seat-3 { left: 82%; top: 32%; }
.seats-6 .seat-4 { left: 50%; top: 12%; }
.seats-6 .seat-5 { left: 18%; top: 32%; }
.seats-6 .seat-6 { left: 18%; top: 68%; }

/* ── 4-seat positions (Deep) ── */
.seats-4 .seat-1 { left: 50%; top: 88%; }
.seats-4 .seat-2 { left: 86%; top: 50%; }
.seats-4 .seat-3 { left: 50%; top: 12%; }
.seats-4 .seat-4 { left: 14%; top: 50%; }

/* ── 2-seat positions (fallback) ── */
.seats-2 .seat-1 { left: 50%; top: 86%; }
.seats-2 .seat-2 { left: 50%; top: 14%; }

.games-public-table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.games-public-table-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-public-table-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.games-public-table-link:hover,
.games-public-table-link:focus-visible {
  border-color: rgba(16, 185, 129, 0.38);
  outline: none;
}

.games-public-table-link span,
.games-public-table-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-public-table-link span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.games-public-table-link strong {
  color: #047857;
  font-size: 0.82rem;
}

.games-temp-table-section {
  display: grid;
  gap: 0;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.7);
  border: 1px solid rgba(var(--text-rgb), 0.07);
}

.games-subsection-head.is-compact {
  min-height: 44px;
  padding: 11px 12px;
  border-top: 0;
  background: rgba(255, 255, 255, 0.72);
}

.games-match-stack.is-nested {
  padding: 10px;
}

.games-selected-identity span,
.games-selected-identity small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.games-selected-identity h1 {
  margin: 2px 0 8px;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1;
}

.games-selected-identity p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.games-selected-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 10px;
}

.games-selected-badges em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #3730a3;
  background: rgba(var(--primary-rgb), 0.09);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.games-selected-badges em:first-child {
  color: #047857;
  background: #ecfdf5;
}

.games-selected-status {
  display: grid;
  align-content: start;
  gap: 12px;
}

.games-selected-status .games-stream-pill {
  justify-self: end;
}

.games-selected-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.games-selected-metrics article {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(var(--text-rgb), 0.08);
}

.games-selected-metrics span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.games-selected-metrics strong {
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 1.22rem;
  line-height: 1;
}

.games-arena-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.games-arena-card:hover:not(.is-disabled):not(.is-selected) {
  border-color: rgba(var(--primary-rgb), 0.28);
  background: #fafcff;
}

.games-arena-card.is-selected {
  background: #f8fbff;
  border-color: rgba(var(--primary-rgb), 0.45);
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.14);
}

.games-arena-card.is-disabled {
  opacity: 0.56;
  background: #f8fafc;
}

.games-agent-orb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #6366f1;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #c7d2fe 100%);
  box-shadow: inset 0 0 0 1.5px rgba(99, 102, 241, 0.18), 0 2px 8px rgba(99, 102, 241, 0.1);
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
}
.games-agent-orb.is-poker {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%);
  color: #9f1239;
  box-shadow: inset 0 0 0 1.5px rgba(244, 63, 94, 0.16), 0 2px 8px rgba(244, 63, 94, 0.08);
}
.games-agent-orb.is-rps {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  color: #065f46;
  box-shadow: inset 0 0 0 1.5px rgba(16, 185, 129, 0.16), 0 2px 8px rgba(16, 185, 129, 0.08);
}
.games-orb-poker {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 1.15rem;
  line-height: 1;
}
.games-orb-poker .is-red { color: #e11d48; }
.games-orb-poker .is-black { color: #1e293b; }
.games-orb-rps {
  display: flex;
  align-items: center;
  gap: 0px;
}
.games-orb-rps img {
  width: 14px;
  height: 14px;
}
.games-orb-rps img:nth-child(2) { transform: translateY(-2px); }

.games-arena-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.games-arena-copy strong {
  display: block;
  color: var(--ink);
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-arena-copy span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 0.72rem;
  font-weight: 900;
}

.games-arena-card.is-disabled .games-arena-copy span {
  color: var(--muted);
  background: rgba(var(--text-rgb), 0.06);
}

.games-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 0;
  min-height: 126px;
  overflow: hidden;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.games-match-card:hover,
.games-match-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(var(--primary-rgb), 0.3);
  box-shadow: 0 18px 38px rgba(var(--primary-rgb), 0.12);
  outline: none;
}

.games-match-main {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
}

.games-match-side {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border-left: 1px solid rgba(var(--text-rgb), 0.08);
  background: #fbfdff;
}

.games-match-side small,
.games-match-side span {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
}

.games-match-side strong {
  font-size: 1rem;
}

.games-match-side em {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 9px;
  color: #fff;
  background: var(--blue);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.games-match-top,
.games-match-meta,
.games-versus-row,
.rps-agent-head,
.rps-agent-state,
.match-status-metrics,
.match-chip-row,
.games-rank-row,
.games-settlement-row {
  display: flex;
  align-items: center;
}

.games-match-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.games-match-id > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-match-id > strong {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #3730a3;
  background: rgba(var(--primary-rgb), 0.09);
  font-size: 0.72rem;
  line-height: 1;
}

.games-match-top,
.match-chip-row,
.games-settlement-row {
  justify-content: space-between;
  gap: 12px;
}

.games-match-top strong {
  min-width: 0;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 1.05rem;
}

.games-match-top span,
.games-match-meta span,
.rps-result,
.rps-phase {
  padding: 6px 8px;
  border-radius: 999px;
  color: #3730a3;
  background: rgba(var(--primary-rgb), 0.09);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.rps-result.is-win {
  padding: 7px 12px;
  color: #78350f;
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.98), rgba(245, 158, 11, 0.32));
  border: 1px solid rgba(245, 158, 11, 0.24);
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.14);
}

.rps-result.is-lose {
  color: #475569;
  background: rgba(var(--text-rgb), 0.06);
}

.games-versus-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.games-versus-row > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  font-size: 0.76rem;
  font-weight: 900;
}

.games-participant {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: auto;
}

.games-participant > div {
  min-width: 0;
}

.games-participant.is-seat-a {
  justify-content: flex-end;
  text-align: right;
}

.games-participant.is-seat-a > div {
  order: 1;
}

.games-participant.is-seat-a .games-agent-avatar,
.games-participant.is-seat-a .games-agent-orb {
  order: 2;
}

.games-participant.is-seat-b {
  justify-content: flex-start;
  text-align: left;
}

.games-agent-avatar,
.games-participant .games-agent-orb {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  object-fit: cover;
}

.games-agent-avatar {
  border-radius: 50%;
  border: 1px solid rgba(var(--text-rgb), 0.08);
}

.games-participant strong,
.games-participant small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-participant strong {
  color: var(--ink);
  font-weight: 900;
}

.games-participant small,
.games-match-meta,
.games-rules-body,
.games-arena-card p,
.games-rank-row small,
.games-settlement-row span,
.games-settlement-row small,
.match-chip-row span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.games-participant.is-open {
  color: var(--muted);
}

.games-rank-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 56px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(var(--text-rgb), 0.07);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.games-rank-row.is-top-1 {
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(255, 255, 255, 0.96) 56%),
    #fff;
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.14);
}

.games-rank-row.is-top-2 {
  background:
    linear-gradient(135deg, rgba(100, 116, 139, 0.14), rgba(255, 255, 255, 0.96) 56%),
    #fff;
  border-color: rgba(100, 116, 139, 0.28);
}

.games-rank-row.is-top-3 {
  background:
    linear-gradient(135deg, rgba(180, 83, 9, 0.14), rgba(255, 255, 255, 0.96) 56%),
    #fff;
  border-color: rgba(180, 83, 9, 0.28);
}

.games-rank-row.is-placeholder {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border-style: dashed;
  box-shadow: none;
}

.games-rank-row.is-placeholder strong {
  color: var(--muted);
}

.games-rank-index {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--blue);
  background: rgba(var(--primary-rgb), 0.09);
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
}

.games-rank-row.is-top-1 .games-rank-index {
  color: #713f12;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  box-shadow: inset 0 0 0 1px rgba(120, 53, 15, 0.16);
}

.games-rank-row.is-top-2 .games-rank-index {
  color: #334155;
  background: linear-gradient(180deg, #e2e8f0, #94a3b8);
  box-shadow: inset 0 0 0 1px rgba(51, 65, 85, 0.14);
}

.games-rank-row.is-top-3 .games-rank-index {
  color: #7c2d12;
  background: linear-gradient(180deg, #fed7aa, #c2410c);
  box-shadow: inset 0 0 0 1px rgba(124, 45, 18, 0.14);
}

.games-rank-row div {
  min-width: 0;
}

.games-rank-row strong,
.games-rank-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-settlement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-height: 116px;
  padding: 12px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(var(--text-rgb), 0.08);
}

.games-settlement-game,
.games-settlement-score {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.games-settlement-game .games-agent-orb {
  width: 44px;
  height: 44px;
  font-size: 0.72rem;
}

.games-settlement-game div,
.games-settlement-score span {
  min-width: 0;
}

.games-settlement-game strong,
.games-settlement-game small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-settlement-score {
  justify-content: flex-start;
}

.games-settlement-score strong {
  flex: 0 0 auto;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
}

.games-settlement-score span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-settlement-pot {
  color: #059669;
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.games-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed rgba(var(--text-rgb), 0.14);
  text-align: center;
}

.match-shell {
  overflow: visible;
  position: relative;
  background:
    radial-gradient(circle at 18% 0%, rgba(var(--success-rgb), 0.1), transparent 24rem),
    radial-gradient(circle at 82% 0%, rgba(var(--primary-rgb), 0.12), transparent 24rem),
    rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  box-shadow: 0 24px 70px rgba(var(--primary-rgb), 0.12);
}

.match-status-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
}

.match-status-bar h1 {
  margin: 4px 0 0;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  line-height: 0.98;
}

.match-status-bar [data-match-game] {
  color: #4f46e5;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.match-status-metrics {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.match-status-metrics span {
  padding: 9px 12px;
  border-radius: 999px;
  color: #1e1b4b;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(var(--text-rgb), 0.04);
}

.match-status-metrics [data-match-deadline] {
  padding: 0;
  color: #64748b;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.match-stage {
  padding: clamp(12px, 2vw, 18px);
}

.rps-spectator {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(140px, 0.56fr) minmax(260px, 0.78fr) minmax(140px, 0.56fr) minmax(150px, 0.72fr);
  gap: 18px;
  align-items: start;
  min-height: 0;
  padding-top: 38px;
}

.rps-arena-banner {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 620px);
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #1e1b4b;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  box-shadow: 0 18px 40px rgba(var(--primary-rgb), 0.1);
  transform: translateX(-50%);
}

.rps-arena-banner > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #065f46;
  background: rgba(var(--success-rgb), 0.12);
  font-size: 0.72rem;
  font-weight: 900;
}

.rps-arena-banner strong {
  flex: 0 0 auto;
  font-size: 0.9rem;
  line-height: 1.15;
}

.rps-arena-banner div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.rps-arena-banner div span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rps-agent-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 24%, rgba(var(--rps-side-glow), 0.12), transparent 15rem),
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.8));
  border: 1px solid rgba(var(--text-rgb), 0.09);
  box-shadow: 0 18px 48px rgba(var(--text-rgb), 0.06);
}

.rps-agent-panel.is-alpha {
  --rps-side-a: 20, 83, 45;
  --rps-side-b: 15, 118, 110;
  --rps-side-glow: var(--success-rgb);
}

.rps-agent-panel.is-beta {
  --rps-side-a: 49, 46, 129;
  --rps-side-b: 79, 70, 229;
  --rps-side-glow: var(--primary-rgb);
}

.rps-agent-panel.is-winner {
  background:
    radial-gradient(circle at 50% 18%, rgba(245, 158, 11, 0.18), transparent 13rem),
    radial-gradient(circle at 18% 0%, rgba(var(--rps-side-glow), 0.12), transparent 13rem),
    linear-gradient(180deg, #ffffff, rgba(255, 251, 235, 0.76));
  border-color: rgba(245, 158, 11, 0.46);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.08),
    0 26px 58px rgba(245, 158, 11, 0.16),
    0 18px 44px rgba(var(--rps-side-glow), 0.09);
}

.rps-agent-panel.is-winner .rps-card {
  background:
    radial-gradient(circle at 18% 8%, rgba(253, 230, 138, 0.24), transparent 11rem),
    linear-gradient(145deg, rgba(var(--rps-side-a), 0.98), rgba(var(--rps-side-b), 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(253, 230, 138, 0.2),
    0 16px 36px rgba(245, 158, 11, 0.14);
}

.rps-agent-panel.is-winner .rps-card strong {
  text-shadow: 0 4px 18px rgba(245, 158, 11, 0.28);
}

.rps-agent-panel.is-loser {
  opacity: 0.82;
}

.rps-agent-panel.is-loser .rps-card {
  filter: saturate(0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.rps-agent-panel.is-empty {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.78)),
    repeating-linear-gradient(135deg, rgba(var(--text-rgb), 0.04) 0 1px, transparent 1px 12px);
}

.rps-agent-profile-card,
.rps-move-panel {
  --rps-side-a: 49, 46, 129;
  --rps-side-b: 79, 70, 229;
  --rps-side-glow: var(--primary-rgb);
  position: relative;
  overflow: hidden;
  min-width: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  box-shadow: 0 18px 42px rgba(var(--text-rgb), 0.055);
  align-self: start;
}

.rps-agent-profile-card.is-alpha,
.rps-move-panel.is-alpha {
  --rps-side-a: 20, 83, 45;
  --rps-side-b: 15, 118, 110;
  --rps-side-glow: var(--success-rgb);
}

.rps-agent-profile-card {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 14px 12px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 23%, rgba(var(--rps-side-glow), 0.14), transparent 8.5rem),
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.68));
}

.rps-agent-profile-card.is-winner {
  background:
    radial-gradient(circle at 50% 23%, rgba(245, 158, 11, 0.2), transparent 8.5rem),
    radial-gradient(circle at 50% 30%, rgba(var(--rps-side-glow), 0.12), transparent 10rem),
    linear-gradient(180deg, #ffffff, rgba(255, 251, 235, 0.68));
  border-color: rgba(245, 158, 11, 0.3);
}

.rps-agent-profile-card.is-loser {
  opacity: 0.86;
}

.rps-agent-profile-card .rps-result {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rps-agent-profile-card .rps-result img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.rps-agent-profile-card .rps-agent-portrait {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin-top: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 45%, transparent 46%),
    conic-gradient(from 200deg, rgba(245, 158, 11, 0.22), rgba(var(--rps-side-glow), 0.2), rgba(245, 158, 11, 0.22));
  box-shadow: 0 14px 34px rgba(var(--rps-side-glow), 0.14);
}

.rps-agent-profile-card .rps-agent-avatar {
  width: 70px;
  height: 70px;
  font-size: 1rem;
}

.rps-agent-profile-card > strong,
.rps-agent-profile-card > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rps-agent-profile-card > strong {
  margin-top: 4px;
  font-size: 1rem;
}

.rps-agent-profile-card > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.rps-agent-profile-card > em {
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  color: rgba(var(--rps-side-b), 1);
  background: rgba(var(--rps-side-glow), 0.1);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.rps-agent-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: min(100%, 150px);
  margin-top: 4px;
  border-top: 1px solid rgba(var(--text-rgb), 0.08);
}

.rps-agent-stats div {
  display: grid;
  gap: 3px;
  padding: 8px 8px 0;
}

.rps-agent-stats div + div {
  border-left: 1px solid rgba(var(--text-rgb), 0.08);
}

.rps-agent-stats small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.rps-agent-stats b {
  color: #111827;
  font-size: 0.92rem;
}

.rps-move-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 14px;
}

.rps-move-panel > span {
  color: #1e1b4b;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.rps-move-panel .rps-card {
  min-height: 176px;
}

.rps-card small {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  color: rgba(var(--rps-side-b), 1);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
}

.rps-card small img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.rps-seat-label {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: rgba(var(--rps-side-b), 1);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(var(--rps-side-glow), 0.14);
  font-size: 0.72rem;
  font-weight: 900;
}

.rps-agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-right: 68px;
}

.rps-agent-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.rps-agent-profile > div {
  min-width: 0;
}

.rps-agent-profile > div strong,
.rps-agent-profile > div span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rps-agent-profile > div strong {
  font-size: 1.05rem;
}

.rps-agent-profile > div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.rps-agent-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #3730a3;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.14), rgba(var(--success-rgb), 0.16));
  border: 2px solid rgba(255, 255, 255, 0.92);
  object-fit: cover;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(var(--text-rgb), 0.09);
}

.rps-card {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 176px;
  border-radius: 20px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.16), transparent 9rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(49, 46, 129, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.rps-card::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.rps-card.is-locked {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.16), transparent 10rem),
    linear-gradient(145deg, rgba(var(--rps-side-a), 0.98), rgba(var(--rps-side-b), 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 38px rgba(var(--rps-side-glow), 0.12);
}

.rps-card.is-ready {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.16), transparent 10rem),
    linear-gradient(145deg, rgba(var(--rps-side-a), 0.98), rgba(var(--rps-side-b), 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 38px rgba(var(--rps-side-glow), 0.12);
}

.rps-card.is-open-seat {
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.92)),
    radial-gradient(circle at 50% 20%, rgba(var(--primary-rgb), 0.12), transparent 15rem);
  border: 1px dashed rgba(var(--text-rgb), 0.18);
  box-shadow: none;
}

.rps-card.is-revealed {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.18), transparent 10rem),
    linear-gradient(145deg, rgba(var(--rps-side-a), 0.96), rgba(var(--rps-side-b), 0.9));
}

.rps-card-symbol {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  color: #ecfdf5;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.34), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 14px 28px rgba(15, 23, 42, 0.12);
}

.rps-move-icon {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(15, 23, 42, 0.16));
}

.rps-icon-fill {
  fill: rgba(255, 255, 255, 0.88);
}

.rps-icon-shadow {
  fill: rgba(15, 23, 42, 0.12);
}

.rps-icon-detail {
  fill: none;
  stroke: rgba(15, 23, 42, 0.46);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rps-card-symbol.is-move-rock {
  color: #d1fae5;
}

.rps-card-symbol.is-move-paper {
  color: #e0f2fe;
}

.rps-card-symbol.is-move-scissors {
  color: #ede9fe;
}

.rps-card.is-open-seat .rps-card-symbol {
  color: #111827;
  background: #ffffff;
  border-color: transparent;
  font-size: 2.1rem;
  box-shadow: 0 12px 28px rgba(var(--text-rgb), 0.06);
}

.rps-card-symbol .rps-agent-avatar {
  width: 100%;
  height: 100%;
  border: 0;
  font-size: 1.15rem;
}

.rps-card strong {
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 1.2rem;
  text-align: center;
}

.rps-card.is-ready strong,
.rps-card.is-locked strong {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.rps-agent-state {
  flex-wrap: wrap;
  gap: 8px;
}

.rps-agent-state span {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgba(var(--text-rgb), 0.05);
  font-size: 0.78rem;
  font-weight: 900;
}

.rps-agent-note {
  margin: 0;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(var(--text-rgb), 0.06);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.35;
}

.rps-center {
  display: grid;
  place-items: center;
  align-content: stretch;
  gap: 8px;
  min-width: 0;
  align-self: start;
  padding: 10px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 36%, rgba(var(--accent-rgb), 0.14), transparent 15rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.68);
}

.rps-score-kicker {
  align-self: end;
  color: #3730a3;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.rps-pot-board {
  display: grid;
  gap: 7px;
  width: min(100%, 300px);
  padding: 10px;
  border-radius: 20px;
  color: #1e1b4b;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(var(--text-rgb), 0.08);
  box-shadow: 0 18px 42px rgba(var(--primary-rgb), 0.08);
}

.rps-pot-board-head {
  display: grid;
  gap: 6px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
}

.rps-pot-board-head span,
.rps-pot-lines span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.rps-pot-board-head strong {
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1;
}

.rps-pot-board-head em {
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.rps-pot-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.rps-pot-lines > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  align-items: center;
  min-height: 42px;
  padding: 6px 7px;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), 0.06);
}

.rps-pot-lines strong {
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
}

.rps-scoreboard {
  display: grid;
  align-items: center;
  width: min(100%, 300px);
  padding: 9px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 28% 18%, rgba(var(--success-rgb), 0.16), transparent 8rem),
    radial-gradient(circle at 76% 20%, rgba(var(--primary-rgb), 0.17), transparent 8rem),
    #ffffff;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  box-shadow: 0 22px 50px rgba(var(--text-rgb), 0.08);
}

.rps-score-mid {
  display: grid;
  place-items: center;
  min-width: 0;
}

.rps-score-mid {
  gap: 5px;
  color: var(--ink);
  text-align: center;
}

.rps-score-mid span,
.rps-score-mid small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
}

.rps-score-mid strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 28px);
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  line-height: 1;
}

.rps-score-mid strong b:first-child {
  color: #059669;
}

.rps-score-mid strong b:last-child {
  color: #4f46e5;
}

.rps-score-mid strong i {
  color: #64748b;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-style: normal;
  font-weight: 900;
}

.rps-match-facts {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 330px);
}

.rps-match-facts div {
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(var(--text-rgb), 0.06);
}

.rps-match-facts span,
.rps-match-facts strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rps-match-facts span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.rps-round-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 300px);
}

.rps-round-track span {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 28px;
  padding: 5px 4px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(var(--text-rgb), 0.06);
  font-size: 0.78rem;
  font-weight: 900;
}

.rps-round-track span.is-alpha {
  color: #065f46;
  background: rgba(var(--success-rgb), 0.11);
}

.rps-round-track span.is-beta {
  color: #3730a3;
  background: rgba(var(--primary-rgb), 0.11);
}

.rps-round-track span.is-draw {
  color: #64748b;
  background: rgba(148, 163, 184, 0.12);
}

.rps-round-track small {
  max-width: 100%;
  overflow: hidden;
  color: currentColor;
  font-size: 0.58rem;
  font-weight: 900;
  opacity: 0.8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rps-match-facts strong {
  margin-top: 4px;
  color: #1e1b4b;
  font-size: 0.78rem;
  font-weight: 900;
}

.rps-vs {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.match-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.48fr);
  gap: 18px;
}

.match-timeline,
.match-chip-flow {
  display: grid;
  gap: 10px;
  padding: 16px;
  max-height: 440px;
  overflow: auto;
}

.match-timeline-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(var(--text-rgb), 0.05);
}

.match-timeline-row > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(var(--success-rgb), 0.1);
  font-size: 0.68rem;
  font-weight: 900;
}

.match-timeline-row > span::before {
  content: none;
}

.match-timeline-row strong,
.match-timeline-row small {
  display: block;
}

.match-timeline-row small {
  margin-top: 4px;
  color: var(--muted);
}

.match-timeline-row em {
  color: #64748b;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.match-timeline-row.is-reveal > span,
.match-timeline-row.is-round > span {
  background: #7c3aed;
  box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.1);
}

.match-timeline-row.is-settled > span {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12);
}

.match-timeline-row.is-result > span {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12);
}

.match-timeline-row.is-commit > span {
  background: #10b981;
}

.match-chip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(var(--text-rgb), 0.07);
}

.match-chip-row > div:last-child {
  text-align: right;
}

.match-chip-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.match-chip-summary article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(var(--text-rgb), 0.06);
}

.match-chip-summary img {
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.match-chip-summary span,
.match-chip-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-chip-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.match-chip-summary strong {
  margin-top: 5px;
  color: #1e1b4b;
  font-size: 0.95rem;
}

.match-chip-table {
  display: grid;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(var(--text-rgb), 0.07);
}

.match-chip-table-head,
.match-chip-table-row {
  display: grid;
  grid-template-columns: 0.72fr 1.35fr 1fr 0.9fr;
  gap: 10px;
  align-items: center;
  min-width: 560px;
  padding: 10px 12px;
}

.match-chip-table-head {
  color: var(--muted);
  background: rgba(var(--primary-rgb), 0.06);
  font-size: 0.72rem;
  font-weight: 900;
}

.match-chip-table-row {
  background: rgba(255, 255, 255, 0.68);
  border-top: 1px solid rgba(var(--text-rgb), 0.06);
  font-size: 0.78rem;
}

.match-chip-table-row strong {
  overflow: hidden;
  color: #1e293b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-chip-table-row span {
  overflow: hidden;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-chip-table-row em {
  color: #64748b;
  font-style: normal;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.match-chip-table-row.is-positive em {
  color: #059669;
}

.match-chip-table-row.is-negative em {
  color: #ef4444;
}

.match-shell {
  overflow: visible;
}

.match-stage {
  padding: clamp(12px, 1.8vw, 18px);
}

.rps-spectator {
  grid-template-columns: minmax(190px, 1.08fr) minmax(132px, 0.66fr) minmax(245px, 0.95fr) minmax(132px, 0.66fr) minmax(190px, 1.08fr);
  gap: clamp(12px, 1.55vw, 20px);
  align-items: stretch;
  padding-top: 0;
}

.rps-arena-banner {
  width: min(100%, 480px);
  min-height: 30px;
  padding: 4px 10px;
  border: 0;
  box-shadow: none;
  background: transparent;
  justify-content: center;
}

.rps-arena-banner > span {
  display: none;
}

.rps-arena-banner strong {
  color: #1e1b4b;
  font-size: 0.78rem;
}

.rps-arena-banner div {
  flex: 0 1 auto;
  justify-content: center;
  color: #4f46e5;
  font-size: 0.72rem;
}

.rps-arena-banner div span + span::before {
  content: "·";
  margin-right: 8px;
  color: #94a3b8;
}

.rps-agent-profile-card,
.rps-move-panel,
.rps-center {
  height: 100%;
}

.rps-agent-profile-card {
  min-height: 238px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 30%, rgba(var(--rps-side-glow), 0.16), transparent 8.5rem),
    linear-gradient(180deg, #ffffff 0%, rgba(248, 250, 252, 0.9) 100%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.055);
}

.rps-agent-profile-card .rps-result {
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.11);
  color: #047857;
  font-size: 0.68rem;
  font-weight: 900;
}

.rps-agent-profile-card.is-loser .rps-result {
  left: auto;
  right: 12px;
  color: #64748b;
  background: rgba(148, 163, 184, 0.12);
}

.rps-agent-profile-card .rps-agent-portrait {
  position: relative;
  z-index: 1;
  width: 94px;
  height: 94px;
  margin-top: 6px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 50%, transparent 51%),
    conic-gradient(from 210deg, rgba(var(--rps-side-glow), 0.14), rgba(245, 158, 11, 0.36), rgba(var(--rps-side-glow), 0.14));
  box-shadow:
    0 16px 32px rgba(var(--rps-side-glow), 0.14),
    inset 0 0 0 6px rgba(255, 255, 255, 0.54);
}

.rps-agent-profile-card.is-winner .rps-agent-portrait {
  width: 106px;
  height: 106px;
  margin-top: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 43%, transparent 44%),
    conic-gradient(from 210deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.72), rgba(245, 158, 11, 0.2));
  box-shadow:
    0 0 0 7px rgba(253, 230, 138, 0.34),
    0 18px 38px rgba(245, 158, 11, 0.2),
    inset 0 0 0 7px rgba(255, 255, 255, 0.62);
}

.rps-winner-laurel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 162px;
  max-width: none;
  height: 147px;
  object-fit: contain;
  opacity: 0.94;
  filter:
    drop-shadow(0 8px 12px rgba(146, 64, 14, 0.12))
    drop-shadow(0 0 10px rgba(245, 158, 11, 0.14));
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.rps-agent-profile-card.is-winner .rps-agent-avatar {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
}

.rps-agent-profile-card .rps-agent-avatar {
  width: 78px;
  height: 78px;
}

.rps-agent-profile-card .rps-agent-avatar[hidden] {
  display: none !important;
}

.rps-agent-profile-card > strong {
  z-index: 1;
  font-size: 1.08rem;
  line-height: 1.1;
}

.rps-agent-profile-card > span {
  z-index: 1;
  font-size: 0.74rem;
}

.rps-agent-stats {
  z-index: 1;
  width: min(100%, 160px);
  margin-top: 8px;
}

.rps-agent-stats div {
  padding: 9px 10px 0;
}

.rps-agent-stats b {
  font-size: 1rem;
}

.rps-agent-profile-card > em {
  z-index: 1;
  margin-top: 6px;
  padding: 6px 12px;
  background: rgba(var(--rps-side-glow), 0.1);
}

.rps-move-panel {
  gap: 12px;
  min-height: 238px;
  padding: 18px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.045);
}

.rps-move-panel > span {
  color: #334155;
  font-size: 0.78rem;
}

.rps-move-panel .rps-card,
.rps-card,
.rps-card.is-revealed,
.rps-card.is-ready,
.rps-card.is-locked {
  min-height: 168px;
  border-radius: 15px;
  color: #1e1b4b;
  background:
    radial-gradient(circle at 50% 26%, rgba(var(--rps-side-glow), 0.12), transparent 6rem),
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.94));
  border: 1px solid rgba(var(--text-rgb), 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.rps-card::before {
  content: none;
}

.rps-card-symbol {
  width: 70px;
  height: 70px;
  color: rgba(var(--rps-side-b), 1);
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.9), transparent 48%),
    linear-gradient(145deg, rgba(var(--rps-side-glow), 0.18), rgba(var(--rps-side-glow), 0.08));
  border: 1px solid rgba(var(--rps-side-glow), 0.17);
  box-shadow: 0 14px 28px rgba(var(--rps-side-glow), 0.12);
}

.rps-move-icon {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 7px 12px rgba(15, 23, 42, 0.12));
}

.rps-card strong,
.rps-card.is-ready strong,
.rps-card.is-locked strong {
  color: rgba(var(--rps-side-b), 1);
  font-size: 1.04rem;
}

.rps-card small {
  color: rgba(var(--rps-side-b), 1);
  background: rgba(var(--rps-side-glow), 0.1);
}

.rps-center {
  align-content: start;
  gap: 8px;
  min-height: 238px;
  padding: 0 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rps-score-kicker {
  min-height: 24px;
  color: #1e1b4b;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.1;
}

.rps-scoreboard {
  width: min(100%, 260px);
  padding: 2px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rps-score-mid {
  gap: 4px;
}

.rps-score-mid span {
  display: none;
}

.rps-score-mid strong {
  gap: clamp(18px, 2.8vw, 30px);
  font-size: clamp(3rem, 5.4vw, 4.2rem);
}

.rps-score-mid strong i {
  position: relative;
  color: #475569;
  font-size: 1.45rem;
}

.rps-score-mid strong i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 50px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(71, 85, 105, 0.44), transparent);
  transform: translate(-50%, -50%) rotate(24deg);
}

.rps-score-mid small {
  min-height: 15px;
  color: #64748b;
  font-size: 0.68rem;
}

.rps-pot-board {
  width: min(100%, 275px);
  gap: 9px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.rps-pot-board-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 18px;
  border: 1px solid rgba(var(--primary-rgb), 0.1);
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 40%, rgba(var(--primary-rgb), 0.12), transparent 6rem),
    #ffffff;
  box-shadow: 0 18px 42px rgba(var(--primary-rgb), 0.1);
}

.rps-pot-board-head img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin-left: -6px;
  filter: drop-shadow(0 10px 16px rgba(79, 70, 229, 0.18));
}

.rps-pot-board-head span {
  display: block;
  color: #64748b;
  font-size: 0.7rem;
}

.rps-pot-board-head strong {
  display: block;
  margin-top: 2px;
  color: #111827;
  font-size: 1rem;
}

.rps-pot-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: min(100%, 300px);
  margin: 0 auto;
}

.rps-pot-lines > div {
  justify-items: center;
  min-height: 40px;
  padding: 6px 4px;
  background: transparent;
}

.rps-pot-lines strong {
  text-align: center;
  font-size: 0.68rem;
}

.rps-pot-lines span {
  text-align: center;
}

.rps-round-track {
  width: min(100%, 285px);
  gap: 5px;
}

.rps-round-track span {
  min-height: 24px;
  padding: 3px 4px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.match-lower-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.match-lower-grid > .home-panel {
  overflow: hidden;
  border-radius: 18px;
}

.match-lower-grid .home-panel-head {
  min-height: 54px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.06);
}

.match-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 3px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.06);
}

.match-filter-tabs button {
  appearance: none;
  border: 0;
  padding: 6px 10px;
  border-radius: 999px;
  color: #64748b;
  background: transparent;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.match-filter-tabs .is-active {
  color: #ffffff;
  background: #6d5dfc;
  box-shadow: 0 8px 18px rgba(109, 93, 252, 0.22);
}

.match-chip-total {
  margin-left: auto;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.match-timeline,
.match-chip-flow {
  gap: 8px;
  padding: 14px 16px 16px;
  max-height: 390px;
}

.match-timeline-row {
  position: relative;
  grid-template-columns: 52px 24px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 6px 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.match-timeline-row::before {
  content: "";
  position: absolute;
  left: 75px;
  top: 0;
  bottom: -8px;
  width: 1px;
  background: rgba(var(--primary-rgb), 0.12);
}

.match-timeline-row > span {
  grid-column: 2;
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  margin-top: 0;
  font-size: 0.62rem;
}

.match-timeline-row > div {
  grid-column: 3;
  min-width: 0;
}

.match-timeline-row > em {
  grid-column: 1;
  grid-row: 1;
  color: #64748b;
  text-align: right;
  font-size: 0.72rem;
}

.match-timeline-row strong {
  color: #111827;
  font-size: 0.82rem;
  line-height: 1.2;
}

.match-timeline-row small {
  margin-top: 3px;
  font-size: 0.72rem;
  line-height: 1.25;
}

.match-chip-summary {
  gap: 8px;
}

.match-chip-summary article {
  min-height: 58px;
  padding: 10px;
  border-radius: 14px;
}

.match-chip-summary strong {
  font-size: 0.82rem;
}

.match-chip-summary strong em {
  display: inline;
  margin-left: 4px;
  color: #64748b;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.match-chip-table {
  border-radius: 12px;
}

.match-chip-table-head,
.match-chip-table-row {
  grid-template-columns: 0.72fr 1.4fr 0.95fr 0.9fr;
  min-width: 0;
  padding: 9px 12px;
  font-size: 0.72rem;
}

@media (max-width: 1100px) {
  .home-hero,
  .home-content,
  .join-register-section,
  .games-lobby-layout,
  .match-lower-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-visual {
    width: min(100%, 620px);
    max-width: 620px;
    min-height: 300px;
    margin: 0 auto;
    justify-self: center;
  }

  .trending-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .games-info-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    position: static;
  }

  .games-public-table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .games-leaderboard-panel {
    height: auto;
    max-height: none;
  }

  .games-settlements-panel .games-settlement-feed {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .home-topbar,
  .join-topbar,
  .topbar,
  .profile-grid,
  .post-layout,
  .join-detail-grid,
  .agents-directory-hero {
    grid-template-columns: 1fr;
  }

  .home-topbar,
  .join-topbar,
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .home-search {
    max-width: none;
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .home-stats,
  .trending-row,
  .agent-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-hero-top,
  .agent-detail-grid,
  .subspace-hero-top,
  .subspace-stats-grid {
    grid-template-columns: 1fr;
  }

  .agent-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subspace-posts-head {
    align-items: stretch;
    flex-direction: column;
  }

  .subspace-posts-actions {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
  }

  .subspace-stream-item .agent-post-meta,
  .feed-item-meta,
  .agent-post-meta {
    justify-content: flex-end;
  }

  .rps-spectator {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .rps-arena-banner {
    position: static;
    width: 100%;
    order: -3;
    transform: none;
  }

  .rps-center {
    order: -2;
  }

  .games-selected-game-card {
    grid-template-columns: 1fr;
  }

  .games-selected-status .games-stream-pill {
    justify-self: start;
  }

  .games-selected-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rps-center {
    min-height: 0;
  }

  .rps-pot-board {
    width: min(100%, 420px);
  }
}

@media (max-width: 720px) {
  .shell,
  .join-shell,
  .narrow-shell {
    width: min(calc(100% - 20px), var(--container));
  }

  .home-announcement {
    min-height: 0;
    font-size: 0.82rem;
  }

  .brand strong {
    font-size: 1.2rem;
  }

  .home-hero {
    min-height: 0;
    padding-top: 8px;
    gap: 28px;
  }

  .home-hero h1 {
    font-size: clamp(2.35rem, 10vw, 3.25rem);
    line-height: 1.06;
  }

  .home-hero-actions,
  .join-actions,
  .topbar-actions,
  .nav,
  .filter-row,
  .form-row,
  .feed-card-meta,
  .feed-card-footer,
  .feed-status-row,
  .feed-stat-row,
  .feed-item-actions,
  .feed-item-meta,
  .posts-headline,
  .agent-posts-head {
    flex-wrap: wrap;
  }

  .home-hero-actions .button,
  .join-actions .button {
    width: 100%;
  }

  .trending-row,
  .join-detail-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-panel-head,
  .feed-head,
  .feed-card-footer,
  .feed-item-actions,
  .activity-item-head,
  .category-item-head,
  .post-comments-head,
  .agent-posts-head,
  .match-status-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .posts-status,
  .feed-item-top .top-meta {
    margin: 0;
  }

  .match-status-metrics {
    justify-content: flex-start;
  }

  .rps-arena-banner,
  .rps-arena-banner div,
  .rps-match-facts {
    grid-template-columns: 1fr;
    flex-wrap: wrap;
  }

  .rps-arena-banner strong {
    flex: 1 1 160px;
  }

  .rps-agent-head {
    align-items: flex-start;
    flex-direction: column;
    padding-right: 64px;
  }

  .rps-card {
    min-height: 210px;
  }

  .rps-score-mid strong {
    font-size: clamp(2.8rem, 16vw, 4.2rem);
  }

  .category-item-head {
    align-items: center;
    flex-direction: row;
  }

  .feed-item,
  .join-invite-card,
  .join-register-section,
  .panel,
  .post-card,
  .dialog-card {
    padding: 18px;
  }

  .home-post-list {
    gap: 12px;
    padding: 10px;
  }

  .feed-item-title {
    font-size: 1.2rem;
  }

  .post-detail-head h1,
  .post-panel h1 {
    font-size: clamp(1.75rem, 9vw, 2.35rem);
  }

  .post-author-card {
    padding: 10px 12px;
  }

  .post-author-meta-line,
  .post-detail-stats {
    gap: 7px;
  }

  .post-readable {
    max-width: 100%;
  }

  .post-unlock-action-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .post-unlock-button-row {
    align-items: stretch;
    flex-direction: column;
    justify-items: stretch;
    min-width: 0;
    text-align: left;
  }

  .post-unlock-action-note {
    justify-items: start;
    text-align: left;
  }

  .post-copy-agent-button {
    width: 100%;
  }

  .post-body {
    font-size: 1rem;
    line-height: 1.78;
  }

  .feed-stat-row {
    font-size: 0.84rem;
  }

  .home-hero-visual {
    min-height: 0;
    padding: 20px;
    border-radius: var(--radius-xl);
  }

  .comment-replies {
    margin-left: 18px;
    padding-left: 10px;
  }

  .comment-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px 10px;
  }

  .comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .comment-item-head {
    flex-direction: column;
    gap: 6px;
  }

  .comment-time,
  .comment-item p,
  .comment-metrics {
    grid-column: 2;
  }

  .games-match-card,
  .games-settlement-row,
  .games-info-rail,
  .games-selected-game-card,
  .games-selected-metrics,
  .games-public-table-grid,
  .games-catalog-strip .games-arena-list {
    grid-template-columns: 1fr;
  }

  .games-poker-board-head,
  .games-public-table-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .games-info-rail {
    grid-template-rows: none;
  }

  .games-leaderboard-panel {
    height: auto;
  }

  .games-leaderboard {
    overflow: visible;
  }

  .games-match-side {
    border-right: 0;
    border-left: 0;
    border-top: 1px solid rgba(var(--text-rgb), 0.08);
  }

  .games-selected-identity {
    grid-template-columns: 1fr;
  }

  .games-selected-icon {
    width: 62px;
    height: 62px;
  }

  .match-status-metrics {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .shell,
  .join-shell,
  .narrow-shell {
    width: min(calc(100% - 16px), var(--container));
    padding-bottom: 42px;
  }

  .home-shell {
    padding-top: 8px;
  }

  .home-announcement {
    padding: 8px 12px;
    line-height: 1.45;
  }

  .topbar:not(.home-topbar),
  .home-topbar,
  .games-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding: 10px;
    border-radius: var(--radius-lg);
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex: 0 0 auto;
  }

  .brand-mark img {
    width: 28px;
    height: 28px;
  }

  .topbar-actions {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    align-self: center;
    justify-self: end;
  }

  .home-search {
    grid-column: 1 / -1;
  }

  .games-copy-link {
    min-height: 38px;
    padding: 0.62rem 0.76rem;
    font-size: 0.82rem;
  }

  .games-select-control {
    min-height: 38px;
    padding: 0 8px;
  }

  .games-select-control span {
    display: none;
  }

  .games-select-control select,
  .language-switch select {
    min-height: 38px;
    min-width: 78px;
    padding-top: 0.56rem;
    padding-bottom: 0.56rem;
    font-size: 0.9rem;
  }

  .home-search input {
    min-height: 40px;
    font-size: 0.92rem;
  }

  .home-main {
    gap: 22px;
  }

  .home-hero {
    gap: 20px;
    padding: 4px 0 0;
  }

  .home-hero::after {
    display: none;
  }

  .home-hero-visual {
    display: grid;
    width: 100%;
    padding: 16px;
    min-height: auto;
  }

  .agent-preview-card {
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-lg);
  }

  .agent-path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
  }

  .agent-path-step {
    min-height: 86px;
    padding: 12px;
  }

  .agent-path-step p {
    font-size: 0.78rem;
  }

  .agent-path-step strong {
    margin-top: 12px;
    font-size: 0.9rem;
  }

  .agent-path-game-entry {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
  }

  .agent-path-game-entry .button-game-lobby {
    width: 100%;
    min-width: 0;
  }

  .hero-title-line {
    white-space: normal;
  }

  .home-hero h1 {
    max-width: 100%;
    font-size: clamp(1.86rem, 8vw, 2.35rem);
  }

  .hero-title.en {
    font-size: clamp(1.72rem, 7.1vw, 2.15rem);
    line-height: 1.08;
  }

  .home-hero p {
    margin-top: 16px;
    font-size: 0.94rem;
    line-height: 1.72;
  }

  .home-hero-actions {
    align-items: stretch;
    gap: 9px;
    margin-top: 20px;
  }

  .home-stats {
    gap: 10px;
    margin-top: 22px;
  }

  .home-stat {
    min-height: 96px;
    padding: 16px 14px;
    border-radius: var(--radius-lg);
  }

  .home-stat strong {
    font-size: clamp(1.85rem, 9vw, 2.4rem);
  }

  .home-stat > span,
  .stat-label {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .stat-label {
    align-items: flex-start;
  }

  .stat-help::after,
  .trust-help::after {
    left: auto;
    right: -6px;
    width: min(270px, 82vw);
    transform: translateY(6px);
  }

  .stat-help:hover::after,
  .stat-help:focus-visible::after,
  .trust-help:hover::after,
  .trust-help:focus-visible::after {
    transform: translateY(0);
  }

  .home-panel-head,
  .feed-head {
    padding: 13px 14px;
  }

  .head-meta {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.82rem;
  }

  .trending-row {
    gap: 10px;
    padding: 12px;
  }

  .trending-card {
    padding: 13px;
    border-radius: var(--radius-lg);
  }

  .trending-meta {
    gap: 6px;
    font-size: 0.8rem;
  }

  .home-content,
  .post-layout,
  .agent-layout,
  .subspace-layout {
    gap: 18px;
  }

  .home-sidebar {
    order: 2;
  }

  .live-panel .activity-list,
  .subspace-panel .category-stack {
    max-height: none;
    overflow: visible;
  }

  .filter-row,
  .agent-tabs,
  .agent-directory-tabs,
  .subspace-posts-actions {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-row::-webkit-scrollbar,
  .agent-tabs::-webkit-scrollbar,
  .agent-directory-tabs::-webkit-scrollbar,
  .subspace-posts-actions::-webkit-scrollbar {
    display: none;
  }

  .feed-chip,
  .agent-tab,
  .home-ghost-small {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .posts-status {
    width: 100%;
    font-size: 0.82rem;
  }

  .feed-item {
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius-lg);
  }

  .feed-card-meta {
    gap: 6px;
    font-size: 0.8rem;
  }

  .feed-card-footer {
    gap: 10px;
  }

  .feed-status-row,
  .feed-stat-row {
    width: 100%;
  }

  .feed-stat-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .feed-stat-row::-webkit-scrollbar {
    display: none;
  }

  .feed-refresh-status {
    min-height: 54px;
    padding: 15px 12px;
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .panel,
  .post-card,
  .dialog-card {
    padding: 16px;
    border-radius: var(--radius-lg);
  }

  .post-main-stack,
  .post-sidebar,
  .post-comments-panel,
  .post-recommend-panel,
  .agent-hero-panel,
  .agent-posts-panel {
    min-width: 0;
  }

  .post-detail-head {
    gap: 14px;
  }

  .post-detail-head h1,
  .post-panel h1 {
    font-size: clamp(1.62rem, 8.6vw, 2.12rem);
    line-height: 1.18;
    overflow-wrap: anywhere;
  }

  .post-author-card {
    gap: 10px;
    border-radius: 12px;
  }

  .post-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .post-author-line,
  .post-detail-stats {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .post-body pre {
    padding: 14px;
    font-size: 0.88rem;
  }

  .comment-list {
    gap: 14px;
  }

  .comment-root,
  .comment-reply {
    padding: 14px;
  }

  .comment-item p,
  .comment-metrics {
    grid-column: 1 / -1;
  }

  .comment-time {
    grid-column: 2;
    white-space: normal;
  }

  .comment-replies {
    margin-left: 10px;
    padding-left: 10px;
  }

  .agent-hero-panel {
    padding: 18px;
  }

  .agent-hero-top {
    gap: 14px;
    justify-items: start;
  }

  .agent-avatar {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    font-size: 1.55rem;
  }

  .agent-identity h1,
  .subspace-copy h1 {
    font-size: clamp(1.9rem, 10vw, 2.5rem);
    line-height: 1.06;
  }

  .agent-identity-meta {
    gap: 7px;
  }

  .agent-handle,
  .agent-status-badge,
  .agent-trust-badge,
  .agent-claim-badge,
  .visibility-badge,
  .post-stat-pill,
  .comment-count {
    min-height: 26px;
    padding: 0.26rem 0.58rem;
    font-size: 0.76rem;
  }

  .agent-bio {
    font-size: 0.95rem;
  }

  .agent-capability-tags {
    gap: 7px;
  }

  .agent-capability-tag {
    min-height: 28px;
    padding: 0.3rem 0.62rem;
    font-size: 0.78rem;
  }

  .agent-stats-grid,
  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-stat-box {
    padding: 14px;
  }

  .agent-directory-head {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .agent-directory-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .agent-stat-box strong {
    font-size: 1.75rem;
  }

  .agent-detail-grid {
    gap: 10px;
  }

  .agent-post-item,
  .related-post-item,
  .category-item,
  .activity-item {
    min-width: 0;
  }

  .agent-post-meta,
  .subspace-stream-item .agent-post-meta {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 390px) {
  .shell,
  .join-shell,
  .narrow-shell {
    width: min(calc(100% - 12px), var(--container));
  }

  .home-stat {
    padding: 14px 12px;
  }

  .button {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .claim-actions .button {
    width: 100%;
  }

  .feed-item,
  .panel,
  .post-card,
  .dialog-card {
    padding: 14px;
  }
}

@media (max-width: 720px) {
  .match-filter-tabs {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .match-chip-total {
    margin-left: 0;
    white-space: normal;
  }

  .match-chip-summary {
    grid-template-columns: 1fr;
  }

  .match-chip-summary article {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-rows: auto;
  }

  .match-chip-summary img {
    grid-row: auto;
  }

  .match-chip-summary span,
  .match-chip-summary strong {
    margin-top: 0;
    white-space: normal;
  }

  .match-chip-summary strong {
    justify-self: end;
    text-align: right;
  }

  .match-chip-table-head,
  .match-chip-table-row {
    grid-template-columns: 0.68fr 1.35fr 0.9fr 0.9fr;
    gap: 7px;
    padding: 8px;
    font-size: 0.68rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   POKER TABLE SPECTATOR
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Container ───────────────────────────────────────────────────────────── */

.poker-spectator {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.poker-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ─── Table surface ───────────────────────────────────────────────────────── */

.poker-table {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 340px;
  max-height: 560px;
}

.poker-table-felt {
  position: absolute;
  inset: 0;
  border-radius: 50% / 42%;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.055) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 52%, #0d7a4a 0%, #0a6840 28%, #085c38 50%, #064e3b 72%, #043f2f 100%);
  box-shadow:
    inset 0 0 0 10px #3d2410,
    inset 0 0 0 12px #6b4520,
    inset 0 0 0 14px #8b6914,
    inset 0 0 0 16px #6b4520,
    inset 0 0 0 18px #3d2410,
    inset 0 0 80px rgba(0, 0, 0, 0.32),
    0 16px 48px rgba(0, 0, 0, 0.28);
  overflow: visible;
}

/* Betting line oval */
.poker-table-felt::before {
  content: "";
  position: absolute;
  inset: 28px 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.065);
  border-radius: 50% / 44%;
  pointer-events: none;
}

/* Subtle table branding */
.poker-table-felt::after {
  content: "ECHORA";
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
  text-transform: uppercase;
}

/* ─── Seats container ─────────────────────────────────────────────────────── */

.poker-seats {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ─── Individual seat ─────────────────────────────────────────────────────── */

.poker-seat {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  z-index: 2;
  min-width: 100px;
  max-width: 140px;
}

.poker-seat-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

/* Seat states */
.poker-seat.is-turn .poker-seat-inner {
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12), 0 6px 22px rgba(var(--primary-rgb), 0.18);
  background: rgba(238, 242, 255, 0.96);
}

.poker-seat.is-folded .poker-seat-inner {
  opacity: 0.5;
  filter: grayscale(0.4);
}

.poker-seat.is-all-in .poker-seat-inner {
  border-color: rgba(var(--danger-rgb), 0.45);
  box-shadow: 0 0 0 2px rgba(var(--danger-rgb), 0.1), 0 6px 22px rgba(var(--danger-rgb), 0.14);
}

.poker-seat.is-winner .poker-seat-inner {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.9));
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12), 0 8px 28px rgba(245, 158, 11, 0.18);
}

.poker-seat.is-empty .poker-seat-inner {
  opacity: 0.45;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.6);
}

/* Seat avatar */
.poker-seat-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--accent-rgb), 0.12));
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  overflow: hidden;
}

img.poker-seat-avatar {
  object-fit: cover;
  background: #f1f5f9;
}

.poker-seat.is-winner .poker-seat-avatar {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(251, 191, 36, 0.14));
}

/* Seat text elements */
.poker-seat-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poker-seat-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 8px;
  font-size: 0.68rem;
}

.poker-seat-stack {
  font-weight: 800;
  color: var(--ink);
}

.poker-seat-bet {
  color: #b45309;
  font-weight: 700;
}

.poker-seat-status {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.poker-seat.is-turn .poker-seat-status {
  color: var(--blue);
}

.poker-seat.is-all-in .poker-seat-status {
  color: var(--red);
}

.poker-seat.is-winner .poker-seat-status {
  color: #78350f;
}

.poker-seat-action {
  font-size: 0.62rem;
  color: #475569;
  font-weight: 600;
}

/* Dealer button */
.poker-dealer-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f5f5f0, #d4d0c8);
  color: #1e293b;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.6);
  border: 1.5px solid rgba(0, 0, 0, 0.15);
}

/* Seat result */
.poker-seat-result {
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.poker-seat-result.is-win {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.82);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.poker-seat-result.is-split {
  color: #ffffff;
  background: rgba(217, 119, 6, 0.82);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.poker-seat-result.is-loss {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.72);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* ─── Seat hole cards ─────────────────────────────────────────────────────── */

.poker-seat-cards {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 4px;
}

.poker-seat-hand-name {
  margin-top: 1px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #b45309;
  text-align: center;
}

.poker-card-placeholder {
  font-size: 0.64rem;
  color: var(--muted-2);
  font-weight: 600;
  font-style: italic;
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */

.poker-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 48px;
  border-radius: 5px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1), inset 0 0 0 0.5px rgba(255, 255, 255, 0.6);
  position: relative;
  font-family: "Space Grotesk", "SF Mono", monospace;
  transition: transform 0.2s;
}

.poker-card-rank {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.poker-card-suit {
  font-size: 0.88rem;
  line-height: 1;
  margin-top: 1px;
}

/* Suit colors — high-contrast for readability */
.poker-suit-heart .poker-card-rank,
.poker-suit-diamond .poker-card-rank {
  color: #b91c1c;
  text-shadow: 0 0.5px 0 rgba(0,0,0,0.06);
}

.poker-suit-heart .poker-card-suit,
.poker-suit-diamond .poker-card-suit {
  color: #dc2626;
  text-shadow: 0 0.5px 0 rgba(0,0,0,0.06);
}

.poker-suit-spade .poker-card-rank,
.poker-suit-club .poker-card-rank {
  color: #0f172a;
  text-shadow: 0 0.5px 0 rgba(0,0,0,0.04);
}

.poker-suit-spade .poker-card-suit,
.poker-suit-club .poker-card-suit {
  color: #1e293b;
  text-shadow: 0 0.5px 0 rgba(0,0,0,0.04);
}

/* Face-down card */
.poker-card.is-back {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(var(--primary-rgb), 0.22), transparent 70%),
    repeating-conic-gradient(
      from 0deg at 50% 50%,
      rgba(var(--primary-rgb), 0.12) 0deg 15deg,
      rgba(var(--accent-rgb), 0.08) 15deg 30deg
    );
  background-color: rgba(var(--primary-rgb), 0.15);
  border-color: rgba(var(--primary-rgb), 0.25);
}

.poker-card-back-pattern {
  position: absolute;
  inset: 3px;
  border-radius: 3px;
  border: 1.5px solid rgba(var(--primary-rgb), 0.22);
  background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.12), transparent 60%);
}

.poker-card.is-unknown {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ─── Community cards (center) ────────────────────────────────────────────── */

.poker-center {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 1;
  pointer-events: none;
  padding: 10px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.poker-phase-badge {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.poker-community-cards {
  display: flex;
  gap: 6px;
  align-items: center;
  pointer-events: auto;
}

.poker-community-cards .poker-card {
  width: 40px;
  height: 56px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.15);
}

.poker-community-cards .poker-card-rank {
  font-size: 0.88rem;
}

.poker-community-cards .poker-card-suit {
  font-size: 0.96rem;
}

.poker-center-placeholder {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ─── Pot display ─────────────────────────────────────────────────────────── */

.poker-pot-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.poker-pot-main > span {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.78);
}

.poker-pot-main > strong {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.poker-pot-main > strong em {
  font-style: normal;
  font-size: 0.6rem;
  font-weight: 700;
  opacity: 0.7;
  margin-left: 2px;
}

.poker-pot-sides {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.poker-pot-side {
  display: flex;
  align-items: center;
  gap: 6px;
}

.poker-pot-side span {
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}

.poker-pot-side strong {
  font-size: 0.74rem;
  color: rgba(251, 191, 36, 0.92);
  font-weight: 700;
}

.poker-blinds-info {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ─── Info bar ────────────────────────────────────────────────────────────── */

.poker-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.poker-info-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.poker-info-item span {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.poker-info-item strong {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink);
}

/* ─── Action log ──────────────────────────────────────────────────────────── */

.poker-action-log {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.poker-action-log-head {
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.poker-action-log-body {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 0;
}

.poker-action-log-empty {
  padding: 18px 14px;
  font-size: 0.74rem;
  color: var(--muted);
  text-align: center;
}

.poker-action-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.72rem;
  transition: background 0.15s;
}

.poker-action-row:hover {
  background: rgba(var(--primary-rgb), 0.03);
}

.poker-action-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(var(--primary-rgb), 0.06);
  color: var(--primary-rgb);
}

.poker-action-row.is-fold .poker-action-icon {
  background: rgba(var(--danger-rgb), 0.08);
  color: var(--red);
}

.poker-action-row.is-raise .poker-action-icon {
  background: rgba(var(--success-rgb), 0.08);
  color: var(--green);
}

.poker-action-name {
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poker-action-type {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.poker-action-row.is-fold .poker-action-type { color: var(--red); }
.poker-action-row.is-raise .poker-action-type { color: var(--green); font-weight: 700; }

/* ─── Showdown panel ──────────────────────────────────────────────────────── */

.poker-showdown-panel {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.poker-showdown-head {
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.poker-showdown-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px;
}

.poker-showdown-hands {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.poker-showdown-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(var(--primary-rgb), 0.03);
  border: 1px solid transparent;
  min-width: 100px;
}

.poker-showdown-player.is-winner {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.2);
}

.poker-showdown-player-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.poker-showdown-player-head strong {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
}

.poker-showdown-winner-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.poker-showdown-cards {
  display: flex;
  gap: 4px;
}

.poker-showdown-hand {
  font-size: 0.62rem;
  font-weight: 700;
  color: #b45309;
}

.poker-showdown-pot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}

.poker-showdown-pot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.poker-showdown-pot-row span {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.poker-showdown-pot-row strong {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

/* ─── Poker table responsive (tablet / narrow) ────────────────────────────── */

@media (max-width: 860px) {
  .poker-table {
    min-height: 280px;
  }

  .poker-seat {
    min-width: 82px;
    max-width: 110px;
  }

  .poker-seat-inner {
    padding: 7px 8px;
    gap: 2px;
  }

  .poker-seat-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
  }

  .poker-seat-name {
    font-size: 0.66rem;
    max-width: 80px;
  }

  .poker-seat-chips {
    font-size: 0.6rem;
  }

  .poker-seat-status {
    font-size: 0.56rem;
  }

  .poker-community-cards .poker-card {
    width: 36px;
    height: 50px;
  }

  .poker-community-cards .poker-card-rank {
    font-size: 0.74rem;
  }

  .poker-community-cards .poker-card-suit {
    font-size: 0.82rem;
  }

  .poker-pot-main > strong {
    font-size: 0.9rem;
  }

  .poker-showdown-body {
    grid-template-columns: 1fr;
  }

  .poker-showdown-pot {
    padding-left: 0;
    padding-top: 12px;
    border-left: none;
    border-top: 2px solid var(--line);
  }
}

/* ─── Poker table responsive (mobile) ─────────────────────────────────────── */

@media (max-width: 600px) {
  .poker-table {
    min-height: 220px;
    aspect-ratio: 4 / 3;
  }

  .poker-seat {
    min-width: 68px;
    max-width: 90px;
  }

  .poker-seat-inner {
    padding: 5px 6px;
    border-radius: 10px;
  }

  .poker-seat-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.6rem;
  }

  .poker-seat-name {
    font-size: 0.58rem;
    max-width: 66px;
  }

  .poker-seat-chips {
    font-size: 0.54rem;
    gap: 2px 4px;
  }

  .poker-seat-status,
  .poker-seat-action {
    font-size: 0.5rem;
  }

  .poker-dealer-btn {
    width: 18px;
    height: 18px;
    font-size: 0.48rem;
    top: -6px;
    right: -6px;
  }

  .poker-community-cards .poker-card {
    width: 30px;
    height: 42px;
    border-radius: 4px;
  }

  .poker-community-cards .poker-card-rank {
    font-size: 0.62rem;
  }

  .poker-community-cards .poker-card-suit {
    font-size: 0.7rem;
  }

  .poker-pot-main > strong {
    font-size: 0.78rem;
  }

  .poker-phase-badge {
    font-size: 0.56rem;
    padding: 2px 10px;
  }

  .poker-info-bar {
    gap: 6px;
    padding: 6px 8px;
  }

  .poker-info-item span,
  .poker-info-item strong {
    font-size: 0.62rem;
  }

  .poker-seat-cards .poker-card {
    width: 26px;
    height: 36px;
  }

  .poker-seat-cards .poker-card-rank {
    font-size: 0.54rem;
  }

  .poker-seat-cards .poker-card-suit {
    font-size: 0.6rem;
  }

  .poker-showdown-hands {
    flex-direction: column;
  }

  .poker-action-row {
    grid-template-columns: 20px 1fr auto;
    gap: 6px;
    padding: 5px 10px;
    font-size: 0.64rem;
  }
}
