:root {
  --bg: #08110f;
  --bg-glow: rgba(255, 143, 61, 0.18);
  --panel: rgba(16, 27, 24, 0.92);
  --panel-strong: rgba(19, 33, 29, 0.98);
  --panel-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f8f6f1;
  --muted: #aab6b1;
  --accent: #f4b261;
  --accent-strong: #ff8f3d;
  --success: #28c07b;
  --danger: #e76f51;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
  --radius: 28px;
  --radius-sm: 18px;
  --font-ui: "Rubik", "Noto Sans Hebrew", "Segoe UI", sans-serif;
  --table-bg-opacity: 0.34;
  --table-bg-scale: 1.08;
  --table-bg-position: center center;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  direction: rtl;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, var(--bg-glow), transparent 26%),
    radial-gradient(circle at bottom left, rgba(40, 192, 123, 0.12), transparent 24%),
    linear-gradient(180deg, #091412 0%, #050908 100%);
  color: var(--text);
  font-family: var(--font-ui);
  text-align: right;
  touch-action: manipulation;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  inset: -6%;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 224, 140, 0.1), transparent 24%),
    radial-gradient(circle at 12% 50%, rgba(0, 0, 0, 0.35), transparent 36%),
    radial-gradient(circle at 88% 50%, rgba(0, 0, 0, 0.35), transparent 36%),
    url("/assets/snooker_bg_fullscreen.svg") var(--table-bg-position) / cover no-repeat;
  opacity: var(--table-bg-opacity);
  transform: scale(var(--table-bg-scale)) perspective(1200px) rotateX(2.4deg);
  transform-origin: center center;
  filter: saturate(1.08) contrast(1.06) brightness(0.9);
  animation: tableFloat 18s ease-in-out infinite alternate;
}

body::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(2, 6, 4, 0.72) 0%, rgba(4, 9, 8, 0.54) 18%, rgba(5, 9, 8, 0.48) 44%, rgba(3, 6, 5, 0.84) 100%),
    radial-gradient(circle at center, transparent 18%, rgba(0, 0, 0, 0.36) 72%, rgba(0, 0, 0, 0.68) 100%);
}

.marketing-screen,
.auth-screen,
.lobby-screen,
.game-screen {
  --table-bg-opacity: 0.3;
}

.game-screen {
  --table-bg-opacity: 0.42;
  --table-bg-scale: 1.14;
  --table-bg-position: center top;
}

button,
a,
input {
  touch-action: manipulation;
}

.hidden {
  display: none !important;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--muted);
}

.button,
.primary-action,
.ghost-chip,
.owner-tools__button,
.icon-button,
.mode-button,
.secondary-link,
.score-button {
  font-family: inherit;
}

.button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease;
}

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

.button:active {
  transform: scale(0.985);
  filter: brightness(1.02);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #170f08;
}

.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.danger {
  background: linear-gradient(135deg, #a74b3f, var(--danger));
  color: #fff4f1;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.pill.subtle {
  background: rgba(40, 192, 123, 0.14);
  color: #a8f1c8;
}

.status-message {
  min-height: 24px;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  font-size: 1.08rem;
}

input {
  width: 100%;
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 1.16rem;
  text-align: right;
}

input::placeholder {
  color: rgba(248, 246, 241, 0.45);
}

input:focus {
  outline: 2px solid rgba(255, 143, 61, 0.28);
  border-color: rgba(255, 143, 61, 0.5);
}

.panel {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.panel + .panel {
  margin-top: 16px;
}

.feature-shell {
  position: relative;
  overflow: hidden;
}

.feature-shell::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  transform: translate(-36%, -36%);
  background: radial-gradient(circle, rgba(255, 143, 61, 0.22), transparent 68%);
  pointer-events: none;
}

.button-row,
.hero-actions,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.marketing-screen,
.auth-screen,
.lobby-screen {
  min-height: 100vh;
}

.lobby-screen .eyebrow {
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

.lobby-screen .muted {
  font-size: 1.22rem;
  line-height: 1.85;
}

.lobby-screen .button {
  min-height: 64px;
  font-size: 1.18rem;
}

.lobby-screen .status-message {
  font-size: 1.18rem;
}

.lobby-screen label {
  font-size: 1.16rem;
}

.lobby-screen input {
  min-height: 64px;
  font-size: 1.28rem;
}

.marketing-shell,
.auth-layout,
.lobby-shell {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.marketing-shell,
.auth-layout {
  min-height: 100vh;
  display: grid;
  align-items: center;
}

.hero-surface {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.hero-preview,
.auth-story,
.auth-card,
.lobby-top,
.lobby-main,
.lobby-side {
  padding: 26px;
}

.hero-copy,
.auth-story {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy h1,
.auth-story h1,
.lobby-top h1 {
  margin: 8px 0 14px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p,
.auth-story p {
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-prelude {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hero-prelude__text {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.feature-ribbon {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-preview {
  display: grid;
  gap: 12px;
}

.hero-metric {
  padding: 18px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-metric strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.2rem;
}

.hero-metric p {
  margin: 0;
  color: var(--muted);
}

.hero-metric__label,
.mini-label {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.auth-layout {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 18px;
}

.auth-card,
.lobby-main,
.lobby-side,
.lobby-top {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card__head h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
}

.auth-point {
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.auth-helper {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.auth-helper strong {
  font-size: 1rem;
}

.auth-helper span {
  color: var(--muted);
  line-height: 1.65;
}

.auth-point + .auth-point {
  margin-top: 12px;
}

.auth-point strong {
  display: block;
  margin-bottom: 6px;
}

.auth-point span {
  color: var(--muted);
}

.auth-actions .button {
  flex: 1;
}

.lobby-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.lobby-top__copy {
  max-width: 860px;
}

.lobby-top h1 {
  margin-bottom: 10px;
  font-size: clamp(2.7rem, 4.4vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.lobby-main--single {
  margin-top: 18px;
  padding: 22px;
}

.lobby-copy {
  flex: 1 1 360px;
}

.lobby-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(2.7rem, 4.3vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.lobby-copy p {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.75;
}

.lobby-intro {
  display: grid;
  gap: 16px;
  margin-bottom: 2px;
}

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

.lobby-flow__item {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.16rem;
  font-weight: 700;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lobby-flow__item::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 14px rgba(244, 178, 97, 0.35);
}

.mini-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.ghost-chip {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.quick-table-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hint-card {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.hint-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.hint-card[data-state="checking"]::before {
  background: linear-gradient(180deg, #7bc8ff, #3e9de8);
}

.hint-card[data-state="active"]::before {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
}

.hint-card[data-state="empty"]::before {
  background: linear-gradient(180deg, #8de3b2, #32b56e);
}

.table-decision-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.table-decision-panel__copy {
  display: grid;
  gap: 6px;
}

.table-decision-panel__copy strong {
  font-size: 1.5rem;
  line-height: 1.3;
}

.table-decision-panel__copy p {
  margin: 0;
  color: var(--muted);
}

.table-decision-panel__facts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section-title {
  margin: 4px 0 0;
  font-size: 2.28rem;
  line-height: 1.2;
}

.section-subtitle {
  margin: 8px 0 0;
  font-size: 1.24rem;
  line-height: 1.75;
}

.active-tables-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
}

.active-tables-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.active-table-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.active-table-card__top,
.active-table-card__actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.active-table-card__players {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.active-table-card__body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.active-table-card__body strong {
  font-size: 1.3rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.active-table-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.active-table-card__button {
  flex: 1 1 160px;
}

.table-club-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
}

.section-title-row--start {
  justify-content: flex-start;
}

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

.table-tile {
  min-height: 108px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(27, 44, 39, 0.95), rgba(14, 24, 21, 0.98));
  color: var(--text);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 14px 10px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.table-tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.table-tile:active {
  transform: translateY(0) scale(0.985);
  filter: brightness(1.02);
}

.table-tile strong {
  font-size: 3.25rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.table-tile__label {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9ddd8;
  font-size: 1rem;
  font-weight: 800;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
  font-size: 1.02em;
}

.table-tile.selected {
  border-color: rgba(255, 178, 97, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 178, 97, 0.16), 0 16px 34px rgba(244, 178, 97, 0.14);
  background: linear-gradient(180deg, rgba(77, 53, 22, 0.96), rgba(39, 26, 11, 0.98));
  animation: selectedTilePulse 1.2s ease-out;
}

.manual-table-panel {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.manual-table-panel__copy {
  display: grid;
  gap: 4px;
}

.manual-table-panel__copy strong {
  font-size: 1.44rem;
}

.manual-table-panel__row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 260px);
  gap: 14px;
  align-items: center;
}

.manual-table-panel__label {
  font-size: 1.18rem;
  font-weight: 800;
  margin: 0;
}

.manual-table-panel input {
  max-width: 260px;
  min-height: 64px;
  font-size: 1.28rem;
}

.manual-table-panel__text {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.7;
}

.lobby-actions {
  justify-content: flex-start;
  gap: 14px;
}

.lobby-actions .button {
  min-width: 210px;
  min-height: 64px;
  font-size: 1.18rem;
  padding-inline: 22px;
  gap: 10px;
}

.lobby-actions .button:hover,
.lobby-top .button:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.hint-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.3rem;
}

.hint-card p {
  font-size: 1.2rem;
  line-height: 1.7;
}

/* Lobby typography only: larger text without layout changes */
.lobby-screen .eyebrow {
  font-size: 1.14rem;
  line-height: 1.4;
}

.lobby-screen .muted,
.lobby-screen .manual-table-panel__text,
.lobby-screen .active-table-card__body p,
.lobby-screen .hint-card p,
.lobby-screen .status-message {
  font-size: 1.28rem;
  line-height: 1.85;
}

.lobby-screen .lobby-top h1 {
  font-size: clamp(2.9rem, 4.6vw, 3.9rem);
  line-height: 1.1;
}

.lobby-screen .lobby-copy h2 {
  font-size: clamp(2.9rem, 4.6vw, 3.8rem);
  line-height: 1.1;
}

.lobby-screen .lobby-flow__item,
.lobby-screen .manual-table-panel__label,
.lobby-screen .table-tile__label,
.lobby-screen .lobby-actions .button,
.lobby-screen label,
.lobby-screen input {
  font-size: 1.24rem;
  line-height: 1.5;
}

.lobby-screen .section-title {
  font-size: 2.32rem;
  line-height: 1.2;
}

.lobby-screen .active-table-card__body strong,
.lobby-screen .manual-table-panel__copy strong,
.lobby-screen .hint-card strong {
  font-size: 1.9rem;
  line-height: 1.2;
}

.lobby-screen .section-subtitle {
  font-size: 1.3rem;
  line-height: 1.85;
}

.lobby-screen .table-tile strong {
  font-size: 2.9rem;
  line-height: 1;
}

.game-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px calc(32px + env(safe-area-inset-bottom));
}

.game-screen .eyebrow {
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.top-bar,
.turn-strip,
.status-strip,
.action-panel,
.owner-tools,
.join-panel,
.big-mode-panel__box,
.score-card,
.extras-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.top-bar,
.turn-strip,
.status-strip,
.action-panel,
.owner-tools,
.join-panel,
.big-mode-panel__box,
.score-card {
  border-radius: var(--radius);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.top-bar__left,
.top-bar__right,
.connection-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.2rem;
  font-weight: 800;
}

.connection-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(40, 192, 123, 0.7);
}

.connection-dot.disconnected {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(231, 111, 81, 0.7);
}

.connection-text {
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 700;
}

.icon-button,
.mode-button,
.secondary-link {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  min-height: 54px;
  padding: 0 20px;
  font-weight: 800;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.icon-button {
  width: 54px;
  padding: 0;
  font-size: 1.32rem;
}

.join-panel {
  padding: 18px;
  margin-bottom: 12px;
}

.join-panel__content h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.join-panel__content p {
  margin: 0;
  color: var(--muted);
}

.join-panel__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.primary-action {
  flex: 1;
  min-height: 60px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #1b120a;
  font-weight: 900;
  cursor: pointer;
}

.turn-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
  margin-bottom: 16px;
  border-color: color-mix(in srgb, var(--player-accent, var(--line)) 36%, transparent);
}

.turn-strip__main h1 {
  margin: 0 0 12px;
  font-size: clamp(2.35rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.turn-player-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--player-tint, rgba(255, 255, 255, 0.06));
  border: 1px solid color-mix(in srgb, var(--player-accent, #ffffff) 34%, transparent);
}

.turn-player-avatar,
.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--player-accent, var(--accent-strong)), color-mix(in srgb, var(--player-accent, var(--accent)) 72%, #ffffff 28%));
  color: #170f08;
  font-size: 1.12rem;
  font-weight: 900;
  box-shadow: 0 10px 24px var(--player-glow, rgba(255, 143, 61, 0.22));
}

.turn-player-name {
  font-weight: 800;
  color: var(--text);
  font-size: 1.12rem;
}

.turn-strip__main p {
  margin: 0;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.7;
  max-width: 46ch;
}

.turn-badge {
  min-width: 164px;
  min-height: 72px;
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  text-align: center;
  font-weight: 900;
  line-height: 1.1;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #2e6055, #173b34);
  color: var(--text);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.turn-badge.active {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #170f08;
  animation: pulseGlow 1.6s infinite;
}

.turn-badge.passive {
  background: linear-gradient(135deg, #2e6055, #173b34);
}

.next-step-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 18px;
  align-items: center;
  margin-bottom: 14px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.next-step-card__label {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 900;
}

.next-step-card__main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.next-step-card h2 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.12;
}

.next-step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.26rem;
  line-height: 1.7;
}

.next-step-card__pill {
  min-width: 160px;
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.14rem;
  text-align: center;
}

.next-step-card--ready {
  border-color: rgba(66, 211, 146, 0.38);
  background:
    radial-gradient(circle at 10% 20%, rgba(66, 211, 146, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(21, 62, 47, 0.95), rgba(14, 26, 23, 0.96));
}

.next-step-card--ready .next-step-card__pill {
  background: linear-gradient(135deg, #32d583, #99f6c8);
  color: #07140f;
}

.next-step-card--waiting {
  border-color: rgba(255, 178, 97, 0.3);
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 178, 97, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(45, 35, 20, 0.94), rgba(14, 24, 21, 0.96));
}

.next-step-card--waiting .next-step-card__pill {
  background: rgba(255, 178, 97, 0.16);
  color: #ffe0b6;
}

.next-step-card--watch,
.next-step-card--closed {
  border-color: rgba(255, 255, 255, 0.12);
}

.game-mode--ready .quick-help,
.game-mode--waiting .quick-help,
.game-mode--solo .quick-help {
  display: none;
}

.quick-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.quick-help__copy {
  display: grid;
  gap: 6px;
}

.quick-help__copy strong {
  font-size: 1.12rem;
}

.quick-help__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.quick-help__close {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.game-guide {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.game-guide__header {
  display: grid;
  gap: 6px;
}

.game-guide__header h2 {
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.2;
}

.game-guide__header p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.game-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.game-order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.game-order-item.active {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: rgba(244, 178, 97, 0.08);
}

.game-order-item__index {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.game-order-item__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.game-order-item__copy strong {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 1.08rem;
}

.game-order-item__copy span {
  color: var(--muted);
  font-size: 0.95rem;
}

.score-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.score-card {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 26px;
  background: linear-gradient(180deg, rgba(21, 37, 33, 0.96), rgba(9, 16, 14, 0.98));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  border-color: color-mix(in srgb, var(--player-accent, var(--line)) 24%, transparent);
}

.score-card.active-turn {
  transform: scale(1.02);
  border-color: color-mix(in srgb, var(--player-accent, var(--accent)) 82%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--player-accent, var(--accent)) 20%, transparent), 0 18px 50px var(--player-glow, rgba(244, 178, 97, 0.18));
}

.score-card.score-flash .score-number {
  animation: scorePop 360ms ease;
}

.player-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.score-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.score-card__header h2 {
  margin: 0;
  font-size: 1.34rem;
  color: var(--text);
}

.player-avatar {
  flex: 0 0 auto;
}

.player-avatar--small {
  width: 34px;
  height: 34px;
  font-size: 0.92rem;
}

.player-tag {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(40, 192, 123, 0.15);
  color: #98efbf;
  font-size: 0.98rem;
  font-weight: 800;
}

.score-number {
  font-size: clamp(5.2rem, 13vw, 8rem);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.extras-panel {
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.extras-list {
  display: grid;
  gap: 8px;
}

.extras-panel__header {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.extras-panel__header strong {
  font-size: 0.98rem;
}

.extra-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--player-tint, rgba(255,255,255,0.05)) 78%, rgba(255,255,255,0.03));
  border: 1px solid color-mix(in srgb, var(--player-accent, var(--line)) 18%, transparent);
}

.extra-player__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.extra-player__name {
  color: var(--muted);
  font-weight: 700;
}

.extra-player__score {
  font-weight: 900;
  font-size: 1.2rem;
}

.status-strip {
  margin-bottom: 14px;
  padding: 20px 22px;
  font-size: 1.16rem;
  font-weight: 800;
  color: var(--muted);
}

.status-strip.waiting {
  color: #ffd79f;
}

.status-strip.error {
  color: #ffb4a5;
}

.status-strip:not(.waiting):not(.error) {
  color: #a8f1c8;
}

.recent-actions-panel {
  margin-top: 12px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.recent-actions-panel__header {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.recent-actions-panel__header h2 {
  margin: 4px 0 0;
  font-size: 1.62rem;
}

.recent-actions-panel__hint {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.recent-actions-list {
  display: grid;
  gap: 8px;
}

.recent-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.recent-action--latest {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 178, 97, 0.22);
}

.recent-action--undo {
  border-color: rgba(99, 179, 255, 0.22);
}

.recent-action--reversed {
  opacity: 0.62;
}

.recent-action--empty {
  justify-content: flex-start;
}

.recent-action__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.recent-action__body strong {
  font-size: 1.16rem;
}

.recent-action__body span {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.recent-action__side {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex: 0 0 auto;
}

.recent-action__time {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
}

.recent-action__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 178, 97, 0.14);
  color: #ffd79f;
  font-size: 0.78rem;
  font-weight: 800;
}

.action-panel {
  padding: 24px;
}

.action-panel__header {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.action-panel__header h2 {
  margin: 4px 0 0;
  font-size: 1.72rem;
  line-height: 1.2;
}

.action-panel__hint {
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.action-lock-note {
  margin: 0 0 16px;
  padding: 22px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 178, 97, 0.16), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 178, 97, 0.28);
  color: #ffe0b6;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1.55;
}

.action-panel--ready {
  border-color: rgba(66, 211, 146, 0.26);
}

.action-panel--ready .action-panel__header h2 {
  color: #dfffee;
}

.action-panel--locked {
  border-color: rgba(255, 178, 97, 0.22);
}

.action-panel--locked .action-panel__header h2 {
  color: #ffd79f;
}

.action-panel--locked .action-grid {
  display: none;
}

.action-panel--locked .score-button {
  box-shadow: none;
}

.action-panel--solo .action-lock-note {
  background: linear-gradient(135deg, rgba(99, 179, 255, 0.14), rgba(255, 255, 255, 0.05));
  border-color: rgba(99, 179, 255, 0.24);
  color: #cfe8ff;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.score-button {
  min-height: 88px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, #1f342e, #13221e);
  color: var(--text);
  font-size: 1.48rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
}

.score-button--foul {
  background: linear-gradient(180deg, #5d302b, #41201c);
}

.score-button--secondary {
  grid-column: span 2;
  background: linear-gradient(180deg, #243b35, #172924);
  min-height: 82px;
}

.score-button:active {
  transform: scale(0.97);
  filter: brightness(1.08);
}

.score-button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.owner-tools {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
}

.owner-tools__button {
  flex: 1;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-weight: 800;
  font-size: 1.08rem;
  cursor: pointer;
}

.owner-tools__button--danger {
  color: #ffb4a5;
}

.big-mode-panel {
  margin-top: 12px;
}

.big-mode-panel__box {
  padding: 14px 16px;
}

.big-mode-panel__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.big-mode-panel__box p {
  margin: 0;
  color: var(--muted);
}

.big-mode .action-panel,
.big-mode .owner-tools,
.big-mode .extras-panel,
.big-mode .join-panel,
.big-mode .status-strip {
  display: none;
}

.big-mode .score-stage {
  margin-top: 18px;
}

.big-mode .score-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.big-mode .score-number {
  font-size: clamp(5rem, 16vw, 8rem);
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.08), 0 0 0 rgba(255, 178, 97, 0);
  }
  50% {
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.08), 0 0 24px rgba(255, 178, 97, 0.32);
  }
}

@keyframes scorePop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes selectedTilePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(244, 178, 97, 0.28);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(244, 178, 97, 0);
  }
}

@keyframes tableFloat {
  0% {
    transform: scale(var(--table-bg-scale)) perspective(1200px) rotateX(2.4deg) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(calc(var(--table-bg-scale) + 0.02)) perspective(1200px) rotateX(2.9deg) translate3d(0, -6px, 0);
  }
}

@media (max-width: 980px) {
  .hero-surface,
  .auth-layout,
  .lobby-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body::before {
    inset: -10%;
    animation-duration: 22s;
  }

  .marketing-shell,
  .auth-layout,
  .lobby-shell,
  .game-shell {
    padding: max(12px, env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom));
  }

  .hero-copy,
  .hero-preview,
  .auth-story,
  .auth-card,
  .lobby-top,
  .lobby-main,
  .lobby-side {
    padding: 20px;
  }

  .hero-actions .button,
  .auth-actions .button,
  .lobby-actions .button,
  .join-panel__actions > * {
    width: 100%;
  }

  .button-row,
  .hero-actions,
  .join-panel__actions,
  .lobby-top {
    align-items: stretch;
  }

  .hero-prelude {
    align-items: flex-start;
  }

  .lobby-stats {
    grid-template-columns: 1fr;
  }

  .active-tables-list {
    grid-template-columns: 1fr;
  }

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

  .lobby-flow {
    display: grid;
    grid-template-columns: 1fr;
  }

  .lobby-actions {
    flex-direction: column;
  }

  .lobby-actions .button {
    width: 100%;
    min-width: 0;
  }

  .manual-table-panel__row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .manual-table-panel input {
    max-width: none;
  }

  .top-bar,
  .turn-strip {
    padding: 18px;
  }

  .top-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-bar__right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .turn-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .next-step-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .next-step-card h2 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .next-step-card p {
    font-size: 1.14rem;
  }

  .next-step-card__pill {
    width: 100%;
    min-height: 58px;
  }

  .quick-help {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-help__close {
    width: 100%;
  }

  .turn-player-chip {
    width: 100%;
  }

  .turn-badge {
    min-width: 100%;
    min-height: 60px;
    font-size: 1.04rem;
  }

  .score-stage {
    gap: 10px;
  }

  .score-card {
    padding: 20px 18px 22px;
  }

  .score-number {
    font-size: clamp(4.5rem, 18vw, 6.2rem);
  }

  .action-grid {
    gap: 8px;
  }

  .recent-action {
    align-items: flex-start;
  }

  .recent-action__side {
    justify-items: start;
  }

  .score-button {
    min-height: 82px;
    font-size: 1.26rem;
  }

  .action-panel {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 6;
    background: rgba(12, 22, 19, 0.92);
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  }

  .game-mode--waiting .action-panel,
  .game-mode--closed .action-panel {
    position: static;
  }

  .owner-tools {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-tile {
    min-height: 92px;
  }

  .table-tile strong {
    font-size: 1.7rem;
  }

  .table-tile__label {
    font-size: 0.9rem;
  }

  .game-screen .top-bar__right {
    gap: 8px;
  }

  .game-screen .mode-button {
    min-height: 48px;
    padding: 0 14px;
  }

  .score-stage {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body::before {
    animation: none;
  }
}

/* Lobby readability only: enlarge small text without changing layout */
.lobby-screen .eyebrow {
  font-size: 18px !important;
  line-height: 1.4 !important;
}

.lobby-screen .muted,
.lobby-screen .section-subtitle,
.lobby-screen .manual-table-panel__text,
.lobby-screen .hint-card p,
.lobby-screen .status-message {
  font-size: 18px !important;
  line-height: 1.8 !important;
}

.lobby-screen .button,
.lobby-screen .lobby-flow__item,
.lobby-screen .table-tile__label,
.lobby-screen .manual-table-panel__label,
.lobby-screen label,
.lobby-screen input {
  font-size: 18px !important;
  line-height: 1.5 !important;
}

.lobby-screen .hint-card strong,
.lobby-screen .manual-table-panel__copy strong {
  font-size: 1.34rem !important;
  line-height: 1.35 !important;
}

.lobby-screen .table-tile strong {
  font-size: 2.55rem !important;
  line-height: 1 !important;
}

/* Global readability only: larger text without breaking cards or names */
body,
button,
input,
a {
  line-height: 1.5;
}

.eyebrow,
.pill,
.hero-prelude__text,
.hero-metric__label,
.mini-label,
.connection-text,
.table-tile__label,
.manual-table-panel__label,
.status-message,
.secondary-link,
.button-icon,
.player-tag,
.recent-action__time,
.recent-action__badge,
.big-mode-panel__eyebrow,
.extra-player__name {
  font-size: 17px !important;
  line-height: 1.55 !important;
}

.button,
.ghost-chip,
.icon-button,
.mode-button,
.score-button,
.owner-tools__button,
.active-table-card__players,
.action-panel__hint,
.recent-actions-panel__hint,
.big-mode-panel__box p,
.quick-help__copy p,
.turn-strip__main p,
.join-panel__content p,
.lobby-screen input,
.auth-screen input,
.marketing-screen .hero-copy p,
.auth-screen .auth-story p,
.auth-screen .auth-card p,
.lobby-screen .muted,
.lobby-screen .section-subtitle,
.game-screen .status-strip,
.active-table-card__body p,
.hint-card p,
.manual-table-panel__text,
.recent-action__body span {
  font-size: 19px !important;
  line-height: 1.7 !important;
}

.table-badge,
.turn-badge,
.turn-player-name,
.quick-help__close,
.active-table-card__button,
.extra-player__score,
.score-card__header h2,
.join-panel__actions .primary-action,
.join-panel__actions .secondary-link,
.owner-tools__button,
.big-mode-panel__box {
  font-size: 20px !important;
  line-height: 1.5 !important;
}

.hint-card strong,
.manual-table-panel__copy strong,
.active-table-card__body strong,
.quick-help__copy strong,
.recent-actions-panel__header h2,
.action-panel__header h2,
.join-panel__content h2,
.extras-panel__header strong,
.recent-action__body strong {
  font-size: 23px !important;
  line-height: 1.35 !important;
}

.turn-strip__main h1,
.lobby-screen .section-title,
.lobby-screen .lobby-copy h2,
.auth-screen .auth-card h2,
.auth-screen .auth-story h1,
.marketing-screen .hero-copy h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem) !important;
  line-height: 1.14 !important;
}

.active-table-card__body strong,
.active-table-card__body p,
.recent-action__body strong,
.recent-action__body span,
.score-card__header h2,
.turn-player-name,
.extra-player__name {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.trial-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(241, 174, 82, 0.35);
  border-radius: 999px;
  background: rgba(241, 174, 82, 0.12);
  color: #f8d08a;
  font-size: 18px;
  font-weight: 800;
}

.feedback-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.46);
}

.capacity-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.capacity-panel__card {
  width: min(100%, 520px);
  padding: 28px;
  border: 1px solid rgba(241, 174, 82, 0.5);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(22, 31, 27, 0.98), rgba(8, 18, 14, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  text-align: center;
}

.capacity-panel__card strong {
  display: block;
  margin-bottom: 12px;
  color: #f8d08a;
  font-size: clamp(30px, 6vw, 46px);
}

.capacity-panel__card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 21px;
  line-height: 1.65;
}

.feedback-panel__card {
  position: relative;
  width: min(100%, 560px);
  padding: 24px;
  border: 1px solid rgba(241, 174, 82, 0.4);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(22, 31, 27, 0.98), rgba(8, 18, 14, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.feedback-panel__card h2 {
  margin: 8px 0;
  font-size: clamp(28px, 5vw, 40px);
}

.feedback-panel__card p,
.feedback-panel__card textarea,
.feedback-panel__meta {
  font-size: 18px;
  line-height: 1.7;
}

.feedback-panel__close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}

.feedback-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  color: rgba(255, 255, 255, 0.72);
}

.feedback-panel__meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.feedback-rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.feedback-rating button {
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.feedback-rating button.selected {
  border-color: rgba(241, 174, 82, 0.9);
  background: linear-gradient(135deg, #f1ae52, #f7c56d);
  color: #17110a;
}

.feedback-panel textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  resize: vertical;
}

.admin-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 32px 18px 80px;
}

.admin-hero,
.admin-stats,
.admin-panel {
  margin-bottom: 18px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-hero h1 {
  margin: 8px 0;
  font-size: clamp(34px, 5vw, 54px);
}

.admin-hero p {
  font-size: 22px;
}

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

.admin-stat {
  min-height: 130px;
}

.admin-stat span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  font-weight: 800;
}

.admin-stat strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(38px, 6vw, 58px);
}

.admin-panel {
  padding: 26px;
}

.admin-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
  font-size: 18px;
}

.admin-row strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.admin-row span,
.admin-row p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.55;
}

.admin-row--feedback,
.admin-row--user {
  grid-template-columns: 1.4fr 0.7fr 0.9fr 1fr;
}

.admin-row__button {
  min-width: 120px;
}

.admin-empty {
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 20px;
  font-weight: 800;
}

.admin-empty--warning {
  border: 1px solid rgba(241, 174, 82, 0.38);
  background: rgba(241, 174, 82, 0.1);
  color: #f8d08a;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 18px;
  line-height: 1.55;
}

.terms-check input {
  width: 22px;
  min-width: 22px;
  height: 22px;
  margin-top: 3px;
  accent-color: #f1ae52;
}

.activate-layout {
  align-items: stretch;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-user-actions code,
.admin-row--code code {
  display: inline-flex;
  direction: ltr;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(241, 174, 82, 0.14);
  color: #ffd994;
  font-size: 18px;
  font-weight: 900;
}

.admin-row--code {
  grid-template-columns: 1fr 0.7fr 1fr 1fr;
}

@media (max-width: 640px) {
  .eyebrow,
  .pill,
  .hero-prelude__text,
  .hero-metric__label,
  .mini-label,
  .connection-text,
  .table-tile__label,
  .manual-table-panel__label,
  .status-message,
  .secondary-link,
  .button-icon,
  .player-tag,
  .recent-action__time,
  .recent-action__badge,
  .big-mode-panel__eyebrow,
  .extra-player__name {
    font-size: 16px !important;
  }

  .button,
  .ghost-chip,
  .icon-button,
  .mode-button,
  .score-button,
  .owner-tools__button,
  .active-table-card__players,
  .action-panel__hint,
  .recent-actions-panel__hint,
  .big-mode-panel__box p,
  .quick-help__copy p,
  .turn-strip__main p,
  .join-panel__content p,
  .lobby-screen input,
  .auth-screen input,
  .marketing-screen .hero-copy p,
  .auth-screen .auth-story p,
  .auth-screen .auth-card p,
  .lobby-screen .muted,
  .lobby-screen .section-subtitle,
  .game-screen .status-strip,
  .active-table-card__body p,
  .hint-card p,
  .manual-table-panel__text,
  .recent-action__body span {
    font-size: 18px !important;
  }

  .table-badge,
  .turn-badge,
  .turn-player-name,
  .quick-help__close,
  .active-table-card__button,
  .extra-player__score,
  .score-card__header h2,
  .join-panel__actions .primary-action,
  .join-panel__actions .secondary-link,
  .owner-tools__button,
  .big-mode-panel__box {
    font-size: 19px !important;
  }

  .hint-card strong,
  .manual-table-panel__copy strong,
  .active-table-card__body strong,
  .quick-help__copy strong,
  .recent-actions-panel__header h2,
  .action-panel__header h2,
  .join-panel__content h2,
  .extras-panel__header strong,
  .recent-action__body strong {
    font-size: 21px !important;
  }
}

@media (max-width: 900px) {
  .admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

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

  .admin-row,
  .admin-row--feedback,
  .admin-row--user {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .trial-status {
    width: 100%;
    justify-content: center;
    border-radius: 18px;
    text-align: center;
  }
}
