#gm-invite-wrap {
  position: relative;
  width: 100%;
}

.gm-invite-btn {
  width: 100%;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(var(--primary-rgb),.35);
  background: rgba(var(--primary-rgb),.08);
  color: #dce1ffd9;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s,border-color .15s;
}

.gm-invite-btn:hover {
  background: rgba(var(--primary-rgb),.15);
  border-color: rgba(var(--primary-rgb),.55);
}

.gm-invite-panel {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid rgba(var(--primary-rgb),.25);
  border-radius: 12px;
  box-shadow: 0 8px 28px #00000080;
  z-index: 50;
  overflow: hidden;
}

.gm-invite-panel-header {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fccc;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.gm-invite-list {
  max-height: 200px;
  overflow-y: auto;
}

.gm-invite-empty {
  padding: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.gm-invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

.gm-invite-row:last-child {
  border-bottom: none;
}

.gm-invite-name {
  font-size: 13px;
  color: #ebf0ffe6;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gm-invite-send-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(var(--primary-rgb),.4);
  background: rgba(var(--primary-rgb),.1);
  color: #dce1ffe6;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}

.gm-invite-send-btn:hover:not(:disabled) {
  background: rgba(var(--primary-rgb),.2);
}

.gm-invite-send-btn:disabled {
  opacity: .6;
  cursor: default;
}

.gm-invite-send-btn.sent {
  border-color: #6ee7b766;
  color: #86efac;
}

.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.arcade-card {
  background: color-mix(in srgb,var(--ac) 7%,var(--card-solid));
  border: 1px solid color-mix(in srgb,var(--ac) 18%,transparent);
  border-radius: 16px;
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .2s,transform .15s;
}

.arcade-card:hover {
  border-color: color-mix(in srgb,var(--ac) 45%,transparent);
  transform: translateY(-2px);
}

.arcade-card--xo {
  --ac: #818cf8;
}

.arcade-card--wb {
  --ac: #f87171;
}

.arcade-card--tq {
  --ac: #fbbf24;
}

.arcade-card--tr {
  --ac: #34d399;
}

.arcade-card--rps {
  --ac: #fb923c;
}

.arcade-card--dg {
  --ac: #e879f9;
}

.arcade-card--ck {
  --ac: #f59e0b;
}

.arcade-card--ck .arcade-play-btn {
  background: #f59e0b;
  color: #000;
}

.arcade-card--sf {
  --ac: #a78bfa;
}

.arcade-card--sf .arcade-play-btn {
  background: #a78bfa;
}

.arcade-card--solo-2048 {
  --ac: #f59e0b;
}

.arcade-card--solo-2048 .arcade-play-btn {
  background: #f59e0b;
}

.arcade-card--solo-snake {
  --ac: #4ade80;
}

.arcade-card--solo-snake .arcade-play-btn {
  background: #22c55e;
}

.arcade-card--solo-memory {
  --ac: #38bdf8;
}

.arcade-card--solo-memory .arcade-play-btn {
  background: #0ea5e9;
}

.arcade-card--solo-breakout {
  --ac: #ef4444;
}

.arcade-card--solo-breakout .arcade-play-btn {
  background: #ef4444;
}

.arcade-badge--solo {
  background: #ffffff14;
  color: var(--muted);
}

.arcade-card-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.arcade-card-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.arcade-card-body p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 8px;
}

.arcade-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: color-mix(in srgb,var(--ac) 12%,transparent);
  color: var(--ac);
  border: 1px solid color-mix(in srgb,var(--ac) 30%,transparent);
}

.arcade-play-btn {
  background: var(--ac);
  color: #000000d9;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  transition: opacity .15s;
  font-family: Inter,Noto Sans Thai,sans-serif;
}

.arcade-play-btn:hover {
  opacity: .85;
}

.arcade-play-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

a.arcade-play-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

.arcade-creating {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.arcade-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(var(--primary-rgb),.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

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

.gm-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--topbar-h, 56px);
  background: var(--bg);
}

.gm-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 48px;
  background: var(--card-solid);
  border-bottom: 1px solid rgba(var(--primary-rgb),.15);
  flex-shrink: 0;
  position: fixed;
  top: var(--topbar-h, 56px);
  left: 0;
  right: 0;
  z-index: 50;
}

.gm-room-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.gm-room-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.gm-room-id {
  font-family: ui-monospace,Menlo,Consolas,monospace;
  font-size: 15px;
  font-weight: 700;
  color: #a5b4fc;
  letter-spacing: .1em;
}

.gm-copy-btn {
  background: rgba(var(--primary-rgb),.08);
  border: 1px solid rgba(var(--primary-rgb),.2);
  color: #818cf8;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .1s;
  font-family: Inter,Noto Sans Thai,sans-serif;
}

.gm-copy-btn:hover {
  background: rgba(var(--primary-rgb),.15);
}

.gm-players {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gm-player-chip {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #ffffff0f;
  color: var(--text-sub);
  font-weight: 500;
}

.gm-player-chip.is-me {
  color: #a5b4fc;
  background: rgba(var(--primary-rgb),.12);
}

.gm-lobby {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.gm-lobby-card {
  background: var(--card-solid);
  border: 1px solid rgba(var(--primary-rgb),.2);
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gm-lobby-icon {
  font-size: 3.5rem;
}

.gm-lobby-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.gm-lobby-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.gm-lobby-rules {
  line-height: 1.6;
}

.lobby-player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}

.lobby-player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff0a;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text);
}

.lobby-player-item .host-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(var(--primary-rgb),.2);
  color: #818cf8;
  margin-left: auto;
}

.gm-result {
  position: fixed;
  inset: 0;
  background: #000000d9;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.gm-result-card {
  background: var(--surface);
  border: 1px solid rgba(var(--primary-rgb),.3);
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.gm-result-card h2 {
  font-size: 1.8rem;
  margin: 0 0 8px;
}

.gm-result-card p {
  color: var(--text-sub);
  margin: 0 0 24px;
}

.gm-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.xo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  gap: 24px;
}

.xo-status-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 360px;
  justify-content: space-between;
}

.xo-player-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.xo-player-mark {
  font-size: 1.8rem;
  line-height: 1;
}

.xo-player-name {
  font-size: 12px;
  color: var(--muted);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xo-player-info.active .xo-player-name {
  color: #a5b4fc;
}

.xo-turn-label {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

.xo-board {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  width: min(300px,90vw);
}

.xo-cell {
  aspect-ratio: 1;
  background: var(--card-solid);
  border: 2px solid rgba(var(--primary-rgb),.2);
  border-radius: 12px;
  font-size: 2.5rem;
  cursor: pointer;
  transition: background .12s,border-color .12s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 700;
}

.xo-cell:hover:not(:disabled) {
  background: #13132a;
  border-color: rgba(var(--primary-rgb),.4);
}

.xo-cell:disabled {
  cursor: default;
}

.xo-cell.x-mark {
  color: #818cf8;
  border-color: #818cf866;
}

.xo-cell.o-mark {
  color: #f87171;
  border-color: #f8717166;
}

.xo-cell.winning {
  background: rgba(var(--primary-rgb),.15);
  border-color: var(--primary);
}

.xo-result {
  font-size: 1.4rem;
  font-weight: 700;
  color: #a5b4fc;
  text-align: center;
}

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

.wb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px 20px;
}

.wb-players-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.wb-player-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: var(--card-solid);
  border: 2px solid rgba(var(--primary-rgb),.15);
  border-radius: 12px;
  min-width: 100px;
  transition: border-color .2s;
}

.wb-player-card.is-current {
  border-color: #f59e0b;
  box-shadow: 0 0 16px #f59e0b26;
}

.wb-player-card.is-dead {
  opacity: .35;
}

.wb-player-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.wb-player-lives {
  font-size: 18px;
  letter-spacing: 2px;
}

.wb-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 480px;
}

.wb-letter-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wb-letter-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.wb-letter {
  font-size: 3.5rem;
  font-weight: 900;
  color: #fbbf24;
  text-transform: uppercase;
  letter-spacing: .1em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(251,191,36,.4);
}

.wb-last-word {
  font-size: 16px;
  color: var(--muted);
  font-family: ui-monospace,Menlo,Consolas,monospace;
  min-height: 24px;
}

.wb-last-word-text,.wb-last-word-arrow {
  color: var(--muted);
}

.wb-last-letter-hint {
  color: #a5b4fc;
  font-weight: 700;
  font-size: 20px;
}

.wb-timer-bar-wrap {
  width: 100%;
  height: 6px;
  background: #ffffff0f;
  border-radius: 3px;
  overflow: hidden;
}

.wb-timer-bar {
  height: 100%;
  background: #f59e0b;
  border-radius: 3px;
  transition: width .3s linear,background .3s;
}

.wb-timer-bar.danger {
  background: #ef4444;
}

.wb-turn-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.wb-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.wb-input {
  flex: 1;
  background: var(--card-solid);
  border: 2px solid rgba(var(--primary-rgb),.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 16px;
  color: var(--text);
  font-family: Inter,Noto Sans Thai,sans-serif;
  outline: none;
  transition: border-color .15s;
}

.wb-input:focus {
  border-color: var(--primary);
}

.wb-input:disabled {
  opacity: .4;
}

.wb-submit-btn {
  background: #f59e0b;
  color: #000000d9;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: 10px;
  padding: 0 20px;
  cursor: pointer;
  font-family: Inter,Noto Sans Thai,sans-serif;
  transition: opacity .15s;
}

.wb-submit-btn:hover {
  opacity: .85;
}

.wb-submit-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.wb-invalid {
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.wb-used-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 480px;
  justify-content: center;
  max-height: 120px;
  overflow-y: auto;
}

.wb-used-word {
  font-size: 12px;
  padding: 3px 10px;
  background: #ffffff0d;
  border-radius: 20px;
  color: var(--muted);
  font-family: ui-monospace,Menlo,Consolas,monospace;
}

.tq-wrap {
  display: flex;
  gap: 24px;
  padding: 24px 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  flex-wrap: wrap;
}

.tq-scoreboard {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.tq-score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-solid);
  border: 1px solid rgba(var(--primary-rgb),.15);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
}

.tq-score-name {
  color: var(--text-sub);
  font-weight: 500;
}

.tq-score-pts {
  color: #a5b4fc;
  font-weight: 700;
  font-family: ui-monospace,Menlo,Consolas,monospace;
}

.tq-score-item.is-me {
  border-color: rgba(var(--primary-rgb),.35);
}

.tq-main {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tq-progress {
  height: 4px;
  background: #ffffff0f;
  border-radius: 2px;
  overflow: hidden;
}

.tq-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width .3s;
}

.tq-qnum {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.tq-question {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  min-height: 60px;
}

.tq-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tq-option {
  background: var(--card-solid);
  border: 2px solid rgba(var(--primary-rgb),.15);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  text-align: left;
  font-family: Inter,Noto Sans Thai,sans-serif;
  font-weight: 500;
  line-height: 1.3;
}

.tq-option:hover:not(:disabled) {
  border-color: rgba(var(--primary-rgb),.4);
  background: #13132a;
}

.tq-option:disabled {
  cursor: default;
}

.tq-option.selected {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),.1);
  color: #a5b4fc;
}

.tq-option.correct {
  border-color: #4ade80;
  background: #4ade801a;
  color: #4ade80;
}

.tq-option.wrong {
  border-color: #f87171;
  background: #f8717114;
  color: #f87171;
}

.tq-timer-bar-wrap {
  height: 6px;
  background: #ffffff0f;
  border-radius: 3px;
  overflow: hidden;
}

.tq-timer-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width .3s linear;
}

.tq-timer-bar.danger {
  background: #ef4444;
}

.tq-answered-count {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.gm-score-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.gm-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff0a;
  border-radius: 10px;
}

.gm-score-rank {
  font-size: 1.4rem;
  width: 36px;
  text-align: center;
}

.gm-score-name {
  flex: 1;
  font-weight: 600;
  color: var(--text);
}

.gm-score-pts {
  font-family: ui-monospace,Menlo,Consolas,monospace;
  color: #a5b4fc;
  font-weight: 700;
  font-size: 1.1rem;
}

.tr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.tr-timer-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.tr-timer-fill {
  height: 100%;
  width: 100%;
  background: #4ade80;
  transition: width .5s linear,background .5s;
}

.tr-text-display {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 1.15rem;
  line-height: 1.9;
  font-family: JetBrains Mono,monospace;
  letter-spacing: .02em;
  user-select: none;
  min-height: 80px;
}

.tr-char {
  transition: color .05s;
}

.tr-ok {
  color: #4ade80;
}

.tr-err {
  color: #f87171;
  background: #f8717126;
  border-radius: 2px;
}

.tr-cursor {
  border-bottom: 2px solid #a5b4fc;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.tr-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  padding: 12px 16px;
  outline: none;
  font-family: JetBrains Mono,monospace;
  transition: border-color .2s;
}

.tr-input:focus {
  border-color: var(--primary);
}

.tr-progress-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tr-player-row {
  display: grid;
  grid-template-columns: 130px 1fr 48px;
  align-items: center;
  gap: 12px;
}

.tr-player-row.is-me .tr-player-name {
  color: #a5b4fc;
}

.tr-player-name {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tr-bar-wrap {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.tr-bar {
  height: 100%;
  background: linear-gradient(90deg,var(--primary),#a78bfa);
  border-radius: 5px;
  transition: width .3s ease;
}

.tr-player-row.is-me .tr-bar {
  background: linear-gradient(90deg,#4ade80,#34d399);
}

.tr-pct {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  font-family: JetBrains Mono,monospace;
}

#tr-results:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000000e0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tr-results-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid rgba(var(--primary-rgb),.35);
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(var(--primary-rgb),.15);
}

.tr-result-icon {
  font-size: 3rem;
}

.tr-results-wrap h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
}

.tr-result-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 320px;
}

.tr-result-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 20px;
}

.tr-result-row.is-me {
  border-color: rgba(var(--primary-rgb),.4);
  background: rgba(var(--primary-rgb),.06);
}

.tr-result-rank {
  font-size: 1.3rem;
}

.tr-result-name {
  font-weight: 600;
  color: var(--text);
}

.tr-result-pct {
  font-size: 12px;
  color: var(--muted);
  font-family: JetBrains Mono,monospace;
}

.rps-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 20px;
}

.rps-scoreboard {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 28px;
}

.rps-score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rps-score-item.is-me .rps-score-name {
  color: #a5b4fc;
}

.rps-score-name {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.rps-score-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.rps-score-sep {
  font-size: 1.2rem;
  color: var(--muted);
}

.rps-round-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rps-timer {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: center;
  transition: color .3s;
}

.rps-timer--urgent {
  color: #f87171;
  animation: pulse .5s ease-in-out infinite alternate;
}

@keyframes pulse {
  to {
    transform: scale(1.1);
  }
}

.rps-arena {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 100px;
}

.rps-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  transition: transform .3s;
}

.rps-side.rps-win {
  transform: scale(1.15);
}

.rps-side.rps-lose {
  opacity: .45;
}

.rps-choice-display {
  font-size: 3.5rem;
  line-height: 1;
}

.rps-choice-name {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

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

.rps-choices {
  display: flex;
  gap: 16px;
}

.rps-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 24px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  color: var(--text-sub);
  font-size: 2rem;
  cursor: pointer;
  transition: border-color .15s,background .15s,transform .1s;
}

.rps-btn span {
  font-size: 12px;
  font-weight: 600;
}

.rps-btn:hover:not(.locked):not(:disabled) {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),.08);
  transform: translateY(-2px);
}

.rps-btn.selected {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),.12);
}

.rps-btn.locked {
  opacity: .5;
  cursor: default;
}

.rps-hint {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

#rps-results:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000000e0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rps-results-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid rgba(var(--primary-rgb),.35);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(var(--primary-rgb),.15);
}

.rps-winner-icon {
  font-size: 3rem;
  text-align: center;
}

.rps-results-wrap h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
  text-align: center;
}

.rps-final-scores {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}

.rps-final-row {
  display: flex;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-sub);
}

.rps-final-row.is-winner {
  border-color: #fbbf2466;
  color: #fbbf24;
  font-weight: 700;
}

.rps-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 260px;
}

.rps-hist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.rps-hist-result {
  font-size: 12px;
  color: var(--muted);
}

.dg-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
  padding: 16px;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.dg-canvas-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dg-canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dg-round-info {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dg-word-display {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .2em;
  font-family: JetBrains Mono,monospace;
  text-align: center;
  flex: 1;
}

.dg-word-display.dg-word--known {
  color: #a5b4fc;
  letter-spacing: .05em;
}

.dg-timer {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  transition: color .3s;
}

.dg-timer--urgent {
  color: #f87171;
  animation: pulse .5s ease-in-out infinite alternate;
}

.dg-canvas {
  width: 100%;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: crosshair;
  display: block;
  touch-action: none;
}

.dg-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dg-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dg-color {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s,transform .1s;
}

.dg-color:hover {
  transform: scale(1.15);
}

.dg-color.active {
  border-color: var(--text);
}

.dg-tool-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dg-size-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dg-size-label input {
  width: 80px;
}

.dg-tool-btn {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s,color .15s;
  font-family: Inter,Noto Sans Thai,sans-serif;
}

.dg-tool-btn:hover {
  border-color: var(--muted);
  color: var(--text-sub);
}

.dg-tool-btn.active {
  border-color: var(--primary);
  color: #a5b4fc;
}

.dg-tool-btn--clear:hover {
  border-color: #f87171;
  color: #f87171;
}

.dg-side-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.dg-scores {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dg-score-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.dg-score-row.is-me .dg-score-name {
  color: #a5b4fc;
}

.dg-score-rank {
  color: var(--muted);
  font-weight: 700;
}

.dg-score-name {
  color: var(--text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dg-score-val {
  color: #fbbf24;
  font-weight: 700;
  font-family: JetBrains Mono,monospace;
}

.dg-chat-box {
  flex: 1;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dg-chat-entry {
  font-size: 13px;
  color: var(--muted);
  word-break: break-word;
}

.dg-chat-entry.dg-chat--correct {
  color: #4ade80;
  font-weight: 600;
}

.dg-chat-entry.dg-chat--me .dg-chat-user {
  color: #a5b4fc;
}

.dg-chat-user {
  font-weight: 600;
}

.dg-guess-row {
  display: flex;
  gap: 8px;
}

.dg-guess-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  font-family: Inter,Noto Sans Thai,sans-serif;
  transition: border-color .2s;
}

.dg-guess-input:focus {
  border-color: var(--primary);
}

.dg-guess-btn {
  padding: 8px 14px;
  background: rgba(var(--primary-rgb),.15);
  border: 1px solid rgba(var(--primary-rgb),.4);
  border-radius: 8px;
  color: #818cf8;
  font-weight: 600;
  cursor: pointer;
  font-family: Inter,Noto Sans Thai,sans-serif;
  transition: background .15s;
}

.dg-guess-btn:hover {
  background: rgba(var(--primary-rgb),.25);
}

.dg-overlay {
  position: absolute;
  inset: 0;
  background: #07070ed9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.dg-overlay-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dg-overlay-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.dg-overlay-word {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
}

.dg-overlay-sub {
  font-size: 14px;
  color: var(--muted);
}

#dg-results:not(.hidden) {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000000e0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dg-results-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid rgba(var(--primary-rgb),.35);
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(var(--primary-rgb),.15);
}

.dg-results-icon {
  font-size: 3rem;
}

.dg-results-wrap h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
}

.dg-final-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 320px;
}

.dg-final-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
}

.dg-final-row.is-me {
  border-color: rgba(var(--primary-rgb),.4);
  background: rgba(var(--primary-rgb),.06);
}

.gm-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 14px 0 4px;
}

.gm-options-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gm-options-label {
  font-size: .82rem;
  color: #ffffff80;
  white-space: nowrap;
  width: 48px;
}

.gm-option-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gm-option-btn {
  background: #ffffff0d;
  color: #ffffff8c;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s,border-color .15s,color .15s;
}

.gm-option-btn:hover:not(:disabled) {
  background: #ffffff17;
  color: #fffc;
}

.gm-option-btn.active {
  background: rgba(var(--primary-rgb),.2);
  border-color: rgba(var(--primary-rgb),.5);
  color: #a5b4fc;
  font-weight: 600;
}

.gm-option-btn:disabled {
  opacity: .4;
  cursor: default;
}

.arcade-room-panel {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.arcade-room-loading,.arcade-room-error,.arcade-room-empty {
  font-size: .82rem;
  color: #ffffff73;
  text-align: center;
  padding: 4px 0;
}

.arcade-room-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.arcade-room-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff0a;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 7px 10px;
}

.arcade-room-host {
  flex: 1;
  font-size: .84rem;
  color: #fffc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arcade-room-count {
  font-size: .78rem;
  color: #fff6;
  white-space: nowrap;
}

.arcade-room-join-btn {
  background: color-mix(in srgb,var(--ac) 18%,transparent);
  color: var(--ac);
  border: 1px solid color-mix(in srgb,var(--ac) 35%,transparent);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.arcade-room-join-btn:hover {
  background: color-mix(in srgb,var(--ac) 30%,transparent);
}

.arcade-create-btn {
  width: 100%;
  background: transparent;
  color: var(--ac);
  border: 2px dashed color-mix(in srgb,var(--ac) 55%,transparent);
  border-radius: 10px;
  padding: 11px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s,background .15s;
}

.arcade-create-btn:hover {
  background: color-mix(in srgb,var(--ac) 10%,transparent);
  border-color: color-mix(in srgb,var(--ac) 80%,transparent);
}

.arcade-play-btn.active {
  opacity: .7;
}

.hidden {
  display: none!important;
}

[data-theme=light] .arcade-card {
  background: #fff;
  border-color: color-mix(in srgb,var(--ac) 25%,transparent);
}

[data-theme=light] .arcade-card:hover {
  border-color: color-mix(in srgb,var(--ac) 55%,transparent);
}

[data-theme=light] .arcade-card-body h3 {
  color: var(--text);
}

[data-theme=light] .arcade-card-body p {
  color: var(--text-sub);
}

[data-theme=light] .arcade-badge--solo {
  background: #0000000f;
  color: var(--text-sub);
}

[data-theme=light] .gm-invite-panel {
  background: #fff;
  border-color: rgba(var(--primary-rgb),.2);
  box-shadow: 0 8px 24px #0000001f;
}

[data-theme=light] .gm-invite-panel-header {
  color: var(--primary);
  border-color: #00000014;
}

[data-theme=light] .gm-invite-row {
  border-color: #0000000f;
}

[data-theme=light] .gm-invite-name {
  color: var(--text);
}

[data-theme=light] .gm-invite-send-btn {
  background: rgba(var(--primary-rgb),.08);
  border-color: rgba(var(--primary-rgb),.3);
  color: #4f46e5;
}

[data-theme=light] .gm-invite-btn {
  color: #4f46e5;
}

[data-theme=light] .arcade-room-panel {
  border-color: #0000001a;
}

[data-theme=light] .arcade-room-item {
  background: #00000008;
  border-color: #00000014;
}

[data-theme=light] .arcade-room-host {
  color: var(--text);
}

[data-theme=light] .arcade-room-count,[data-theme=light] .arcade-room-loading,[data-theme=light] .arcade-room-error,[data-theme=light] .arcade-room-empty {
  color: var(--muted);
}

[data-theme=light] .gm-option-btn {
  background: #0000000a;
  color: var(--text-sub);
  border-color: #0000001a;
}

[data-theme=light] .gm-option-btn:hover:not(:disabled) {
  background: #00000014;
  color: var(--text);
}

[data-theme=light] .gm-option-btn.active {
  background: rgba(var(--primary-rgb),.15);
  border-color: rgba(var(--primary-rgb),.45);
  color: #4f46e5;
}

[data-theme=light] .gm-options-label {
  color: #00000080;
}

.sf-lobby {
  display: flex;
  justify-content: center;
  padding: 32px 16px 60px;
}

.sf-lobby-card {
  width: 100%;
  max-width: 480px;
  background: var(--card-solid);
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 24px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sf-lobby-icon {
  font-size: 3rem;
  text-align: center;
  line-height: 1;
}

.sf-lobby-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #e8d9ff;
  text-align: center;
  margin: 0;
}

.sf-lobby-room {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.sf-lobby-room strong {
  color: #a78bfa;
}

.sf-lobby-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sf-rule-row {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}

.sf-lobby-players {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sf-lobby-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #ffffff08;
  border: 1px solid rgba(255,255,255,.06);
}

.sf-lobby-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #a78bfa33;
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.sf-lobby-name {
  font-size: 14px;
  color: #d4d4d8;
}

.sf-time-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sf-time-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.sf-time-options {
  display: flex;
  gap: 6px;
}

.sf-time-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(167,139,250,.25);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}

.sf-time-btn.active,.sf-time-btn:hover {
  background: #a78bfa26;
  border-color: #a78bfa99;
  color: #c4b5fd;
}

.sf-start-btn {
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: #a78bfa;
  color: #000000d9;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.sf-start-btn:hover {
  background: #c4b5fd;
}

.sf-lobby-hint {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.sf-game {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 16px 20px 80px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}

.sf-game-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.sf-game-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff08;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 12px 16px;
}

.sf-timer-block {
  text-align: center;
  flex-shrink: 0;
}

.sf-timer {
  font-size: 2rem;
  font-weight: 800;
  color: #a78bfa;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.sf-timer--warn {
  color: #f87171;
  animation: sfPulse 1s infinite;
}

@keyframes sfPulse {
  0%,to {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

.sf-timer-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.sf-turn-banner {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.sf-turn-banner--mine {
  background: #a78bfa26;
  border: 1px solid rgba(167,139,250,.4);
  color: #c4b5fd;
}

.sf-turn-banner--other {
  background: #ffffff0a;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
}

.sf-turn-banner--asked {
  background: #fbbf241f;
  border: 1px solid rgba(251,191,36,.35);
  color: #fde68a;
}

.sf-answer-secs {
  opacity: .6;
  font-size: 11px;
  margin-left: 4px;
}

.sf-done-btn {
  display: inline-block;
  margin: 0 4px;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid rgba(110,231,183,.5);
  background: #6ee7b71a;
  color: #6ee7b7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sf-done-btn:hover {
  background: #6ee7b740;
}

.sf-rolecard {
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.sf-rolecard--player {
  background: linear-gradient(145deg,#0e1628,#0c0c1e);
  border: 1px solid rgba(99,179,237,.25);
}

.sf-rolecard--spy {
  background: linear-gradient(145deg,#1a0e1e,#120812);
  border: 1px solid rgba(248,113,113,.25);
}

.sf-rolecard-icon {
  font-size: 3rem;
  line-height: 1;
}

.sf-rolecard-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.sf-rolecard-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: #e8d9ff;
  line-height: 1.2;
}

.sf-rolecard-value--role {
  font-size: 1.3rem;
  color: #a78bfa;
}

.sf-rolecard-sep {
  width: 60%;
  height: 1px;
  background: #ffffff14;
}

.sf-rolecard-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.sf-rolecard-spy-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f87171;
}

.sf-rolecard-spy-sub {
  font-size: 12px;
  color: var(--muted);
}

.sf-locs-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sf-locs-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sf-locs-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.sf-loc-chip {
  padding: 7px 6px;
  border-radius: 8px;
  text-align: center;
  background: #f871710f;
  border: 1px solid rgba(248,113,113,.15);
  font-size: 12px;
  color: #fca5a5;
  cursor: default;
  transition: background .15s,border-color .15s;
  user-select: none;
}

.sf-loc-chip--pick {
  cursor: pointer;
}

.sf-loc-chip--pick:hover {
  background: #f8717126;
  border-color: #f8717166;
}

.sf-loc-chip--pick.picked {
  background: #f871714d;
  border-color: #f87171;
  color: #fff;
  font-weight: 700;
}

.sf-guess-inline {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sf-guess-inline-timer {
  font-size: 12px;
  color: #f87171;
  text-align: center;
}

.sf-guess-actions {
  display: flex;
  gap: 8px;
}

.sf-guess-cancel-btn {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}

.sf-guess-cancel-btn:hover {
  background: #ffffff0f;
}

.sf-guess-confirm-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(248,113,113,.5);
  background: #f8717126;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.sf-guess-confirm-btn:not([disabled]):hover {
  background: #f871714d;
}

.sf-guess-confirm-btn[disabled] {
  opacity: .4;
  cursor: default;
}

.sf-spy-guess-btn {
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid rgba(248,113,113,.4);
  background: #f871711a;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.sf-spy-guess-btn:hover {
  background: #f8717138;
}

.sf-players-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sf-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sf-player-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sf-prow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffff08;
  border: 1px solid rgba(255,255,255,.07);
  transition: border-color .2s,background .2s;
}

.sf-prow--active {
  background: #a78bfa12;
  border-color: #a78bfa59;
}

.sf-prow--offline {
  opacity: .4;
}

.sf-prow-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sf-prow-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #a78bfa26;
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.sf-prow-name {
  font-size: 14px;
  color: #d4d4d8;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.sf-prow-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sf-btn-ask {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(167,139,250,.5);
  background: #a78bfa26;
  color: #c4b5fd;
  cursor: pointer;
  transition: background .15s;
}

.sf-btn-ask:hover {
  background: #a78bfa4d;
}

.sf-btn-accuse {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(248,113,113,.35);
  background: #f8717112;
  color: #fca5a5;
  cursor: pointer;
  transition: background .15s;
}

.sf-btn-accuse:hover {
  background: #f8717133;
}

.sf-btn-accuse-confirm {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(248,113,113,.7);
  background: #f8717140;
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}

.sf-btn-accuse-confirm:hover {
  background: #f8717173;
}

.sf-btn-accuse-cancel {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s;
}

.sf-btn-accuse-cancel:hover {
  background: #ffffff0f;
}

.sf-prow--pending {
  border-color: #f8717166;
  background: #f871710f;
}

.sf-accuse-tag {
  font-size: 10px;
  font-weight: 600;
  color: #f87171;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f8717126;
}

.sf-you-tag {
  font-size: 10px;
  font-weight: 600;
  color: #a78bfa;
  padding: 1px 6px;
  border-radius: 4px;
  background: #a78bfa26;
}

.sf-active-tag {
  font-size: 10px;
  font-weight: 600;
  color: #fde68a;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fbbf2426;
}

.sf-offline-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 4px;
  background: #ffffff0f;
}

.sf-caught-banner {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  background: #f871711a;
  border: 1px solid rgba(248,113,113,.3);
  color: #fca5a5;
}

.sf-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000000bf;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sf-overlay.hidden {
  display: none;
}

.sf-overlay-card {
  background: var(--surface);
  border: 1px solid rgba(167,139,250,.25);
  border-radius: 24px;
  padding: 32px 28px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sf-overlay-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.sf-overlay-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #e8d9ff;
}

.sf-accuse-info {
  font-size: 14px;
  color: var(--text-sub);
  text-align: center;
  line-height: 2;
}

.sf-accuse-arrow {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.sf-nametag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  background: #a78bfa26;
  color: #c4b5fd;
  font-weight: 700;
  font-size: 15px;
}

.sf-nametag--target {
  background: #f8717126;
  color: #fca5a5;
}

.sf-vote-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.sf-vote-btn {
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
}

.sf-vote-btn:disabled {
  opacity: .35;
  cursor: default;
}

.sf-vote-btn--yes {
  background: #f87171;
  color: #fff;
}

.sf-vote-btn--no {
  background: #374151;
  color: #d1d5db;
}

.sf-vote-btn--yes:not(:disabled):hover {
  opacity: .85;
}

.sf-vote-btn--no:not(:disabled):hover {
  opacity: .85;
}

.sf-vote-tally {
  font-size: 13px;
  color: var(--muted);
}

.sf-vote-msg {
  font-size: 13px;
  color: #a78bfa;
  text-align: center;
}

.sf-end-card {
  max-width: 500px;
}

.sf-end-winner {
  font-size: 1.8rem;
  font-weight: 900;
}

.sf-end-winner--spy {
  color: #f87171;
}

.sf-end-winner--players {
  color: #6ee7b7;
}

.sf-end-reason {
  font-size: 14px;
  color: var(--text-sub);
  text-align: center;
}

.sf-end-reveal {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sf-end-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sf-end-lbl {
  font-size: 12px;
  color: var(--muted);
  width: 56px;
  text-align: right;
  flex-shrink: 0;
}

.sf-end-roles {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sf-result-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sf-result-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
}

.sf-result-header--win {
  background: #6ee7b71f;
  color: #6ee7b7;
  border: 1px solid rgba(110,231,183,.25);
}

.sf-result-header--lose {
  background: #f871711a;
  color: #f87171;
  border: 1px solid rgba(248,113,113,.2);
}

.sf-result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.06);
  background: #ffffff08;
}

.sf-result-card--win {
  border-color: #6ee7b733;
  background: #6ee7b70d;
}

.sf-result-card--lose {
  border-color: #f8717126;
  background: #f871710a;
}

.sf-result-card--me {
  outline: 2px solid rgba(167,139,250,.5);
}

.sf-result-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #a78bfa26;
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.sf-result-card--win .sf-result-avatar {
  background: #6ee7b726;
  color: #6ee7b7;
}

.sf-result-card--lose .sf-result-avatar {
  background: #f871711f;
  color: #f87171;
}

.sf-result-name {
  font-size: 12px;
  color: #d4d4d8;
  font-weight: 600;
  line-height: 1.3;
}

.sf-result-role {
  font-size: 11px;
  color: var(--muted);
}

.sf-new-game-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: #a78bfa;
  color: #000000d9;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}

.sf-new-game-btn:hover {
  background: #c4b5fd;
}

.sf-guide {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sf-guide-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 8px;
}

.sf-guide-section {
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff06;
}

.sf-guide-badge {
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sf-guide-badge--purple {
  color: #c4b5fd;
}

.sf-guide-badge--blue {
  color: #93c5fd;
}

.sf-guide-badge--red {
  color: #fca5a5;
}

.sf-guide-badge--green {
  color: #6ee7b7;
}

.sf-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sf-guide-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.sf-step-num {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #a78bfa26;
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  margin-top: 1px;
}

.sf-guide-tips-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sf-guide-tip {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  padding-left: 10px;
  border-left: 2px solid rgba(255,255,255,.08);
}

.sf-guide-tip--green {
  border-color: #6ee7b773;
  color: #86efac;
}

.sf-guide-tip--red {
  border-color: #f8717173;
  color: #fca5a5;
}

/* ---------- the arcade page: a calm header, a bar to pick the kind of game (and search), and picture cards of one size ---------- */
.arc-page{padding-top:32px}
.arc-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap;margin-bottom:22px}
.arc-title{font-size:clamp(44px,7vw,76px);font-weight:900;letter-spacing:-.05em;line-height:.95;margin:8px 0 10px;color:var(--text)}
.arc-lede{font-size:14px;color:var(--text-sub);margin:0;max-width:420px;line-height:1.6}
.arc-bar{position:sticky;top:var(--topbar-h,56px);z-index:20;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 0;background:rgba(7,7,15,.9);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}
.arc-bar .vs-tabs{border:0;gap:8px;overflow-x:auto;scrollbar-width:none;min-width:0}
.arc-bar .vs-tabs::-webkit-scrollbar{display:none}
.arc-bar .vs-tabs button{margin:0;padding:8px 16px;border:1px solid var(--border);border-bottom-width:1px;border-radius:99px;font-size:13.5px;color:var(--text-sub);background:var(--surface);transition:background .15s,color .15s,border-color .15s}
.arc-bar .vs-tabs button:hover{color:var(--text);border-color:var(--text)}
.arc-bar .vs-tabs button.on{background:var(--text);color:var(--bg);border-color:var(--text)}
.arc-bar .vs-tabs button.on .vs-tabs__n{background:rgba(0,0,0,.12);color:inherit}
.vs-tabs__n{display:inline-block;margin-left:5px;padding:1px 7px;border-radius:99px;background:rgba(251,191,36,.16);color:#fbbf24;font-size:11px;font-weight:800;letter-spacing:0}
.arc-search{flex:0 0 220px;display:flex;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--border);border-radius:99px;background:var(--surface);color:var(--muted);transition:border-color .15s}
.arc-search:focus-within{border-color:var(--primary);color:var(--text)}
.arc-search input{flex:1;min-width:0;background:none;border:0;outline:0;color:var(--text);font:inherit;font-size:13.5px;padding:9px 0}
.arc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;padding-top:20px}
.arc-card{position:relative;display:flex;flex-direction:column;min-width:0;border:1px solid var(--border);background:var(--surface);color:inherit;text-decoration:none;overflow:hidden;transition:transform .2s,border-color .2s,box-shadow .2s}
.arc-card[hidden]{display:none}
.arc-card::before{content:"";position:absolute;left:0;right:0;top:0;height:2px;background:rgb(var(--zc));opacity:.75;z-index:2}
a.arc-card:hover,a.arc-card:focus-visible,.arc-card--room:hover{transform:translateY(-4px);border-color:rgba(var(--zc),.75);box-shadow:0 16px 36px rgba(var(--zc),.18),0 0 0 1px rgba(var(--zc),.22);outline:0}
.arc-card__art{position:relative;display:block;aspect-ratio:16/10;overflow:hidden;background:#080810}
.arc-card__art img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .35s}
a.arc-card:hover .arc-card__art img,.arc-card--room:hover .arc-card__art img{transform:scale(1.08) rotate(-1deg)}
.arc-card__art::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 55%,rgba(8,8,16,.7));pointer-events:none}
.arc-card__badge{position:absolute;left:10px;top:12px;z-index:1;font-style:normal;font-weight:800;font-size:11px;letter-spacing:.04em;color:#fff;background:rgba(0,0,0,.6);padding:3px 9px;border-radius:99px;border:1px solid rgba(var(--zc),.55)}
.arc-card__badge--top{left:auto;right:10px;top:10px;border-radius:4px;font-size:13px;font-weight:900;text-align:right}
.arc-card__badge small{display:block;font-size:8.5px;letter-spacing:.14em;color:var(--muted);font-weight:800}
.arc-card__body{display:flex;flex-direction:column;gap:5px;padding:13px 14px 14px;flex:1;min-width:0}
.arc-card__t{font-size:17px;font-weight:800;letter-spacing:-.025em;line-height:1.2;color:var(--text)}
.arc-card__d{font-size:12.5px;line-height:1.55;color:var(--text-sub)}
.arc-card__go{margin-top:auto;padding-top:8px;font-size:13px;font-weight:800;color:rgb(var(--zc))}
.arc-card__acts{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto;padding-top:10px}
.arc-btn{flex:1 1 auto;padding:10px 12px;border:1px solid var(--border);border-radius:3px;background:none;color:var(--text);font:inherit;font-size:13px;font-weight:800;cursor:pointer;white-space:nowrap;transition:border-color .15s,filter .15s}
.arc-btn:hover{border-color:var(--text)}
.arc-btn--go{background:rgb(var(--zc));border-color:rgb(var(--zc));color:#10101a}
.arc-btn--go:hover{filter:brightness(1.12);border-color:rgb(var(--zc))}
.arc-card--room .arcade-room-panel{margin:0 14px 14px}
.arc-note{margin:22px auto 0;max-width:720px;font-size:12px;line-height:1.7;color:var(--muted);text-align:center}
.arc-empty{margin:60px 0;text-align:center;color:var(--muted);font-size:14px}
.arc-empty[hidden]{display:none}
.vs-section__hdr{padding-top:4px}

/* the wallet cells open a small menu (Crystals: top up / send / shop, Coins: FA packs / exchange / mine / Coin shop) */
.arc-wal{position:relative;display:flex}
.arc-wal:nth-child(1) .vs-cell b{color:#7dd3fc}.arc-wal:nth-child(2) .vs-cell b{color:#fcd34d}
.arc-wal .vs-cell{flex:1;cursor:pointer}
.arc-wal .vs-cell[aria-expanded=true]{background:var(--card-hover)}
.arc-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:30;min-width:260px;background:var(--surface);border:1px solid var(--border);box-shadow:0 14px 40px rgba(0,0,0,.5);padding:6px 0}
.arc-menu[hidden]{display:none}
.arc-menu__bal{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:12px 16px;border-bottom:1px solid var(--border);margin-bottom:4px}
.arc-menu__bal span{font-size:13px;color:var(--text-sub)}
.arc-menu__bal b{font-size:18px;font-weight:800;color:var(--text);font-variant-numeric:tabular-nums}
.arc-menu a{display:flex;align-items:center;gap:12px;padding:11px 16px;font-size:14px;font-weight:700;color:var(--text);text-decoration:none}
.arc-menu a:hover,.arc-menu a:focus-visible{background:var(--card-hover);outline:0}
.arc-menu a i{width:20px;text-align:center;font-style:normal;color:#a3e635}

/* two big groups: free games, and the bet table */
.arc-group{margin-top:56px;--g:34,197,94}
.arc-group:first-of-type{margin-top:30px}
.arc-group--money{--g:251,191,36}
.arc-grp{display:flex;align-items:flex-end;gap:24px;margin-bottom:10px;padding:6px 0 18px;position:relative}
.arc-grp__t{flex:none;max-width:640px}
.arc-grp__k{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.28em;text-transform:uppercase;color:rgb(var(--g));padding:4px 10px;border:1px solid rgba(var(--g),.45);background:rgba(var(--g),.08);margin-bottom:10px}
.arc-grp h2{margin:0;font-size:clamp(32px,5vw,48px);font-weight:900;letter-spacing:-.035em;line-height:1.05;color:var(--text)}
.arc-grp p{margin:8px 0 0;font-size:14.5px;line-height:1.55;color:var(--text-sub)}
.arc-grp__line{flex:1;height:2px;margin-bottom:12px;background:linear-gradient(90deg,rgba(var(--g),.7),rgba(var(--g),0))}
.arc-group[hidden]{display:none}
