:root {
  --ya-ink: #18202d;
  --ya-muted: #677286;
  --ya-line: #dce2e9;
  --ya-soft: #f3f5f7;
  --ya-green: #08715a;
  --ya-green-dark: #055542;
  --ya-gold: #efb92f;
  --ya-red: #d63d53;
  --ya-blue: #2475d9;
  --ya-shadow: 0 18px 52px rgba(22, 31, 44, 0.14);
}

.sync-rail {
  position: fixed;
  inset: 0 0 auto;
  z-index: 3000;
  height: 3px;
  background: rgba(220, 226, 233, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.sync-rail.visible {
  opacity: 1;
}

.sync-rail > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--ya-gold);
  transition: width 160ms ease;
}

.sync-rail > strong,
.sync-rail > b {
  position: absolute;
  top: 9px;
  padding: 4px 7px;
  border: 1px solid var(--ya-line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ya-ink);
  font-size: 10px;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(20, 29, 41, 0.1);
}

.sync-rail > strong {
  left: 10px;
}

.sync-rail > b {
  right: 10px;
}

.top-experience-nav {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 2px;
}

.mobile-channel-button,
.room-members-button,
.room-chat-button {
  display: none;
}

.top-experience-nav button {
  position: relative;
  align-self: stretch;
  min-width: 84px;
  padding: 0 13px;
  border: 0;
  background: transparent;
  color: #667184;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.top-experience-nav button::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  background: var(--ya-gold);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.top-experience-nav button:hover,
.top-experience-nav button.active {
  color: var(--ya-ink);
}

.top-experience-nav button.active::after {
  transform: scaleX(1);
}

.experience-view {
  display: none !important;
}

.experience-view.active {
  display: block !important;
}

.casino-shell.experience-view.active {
  display: grid !important;
}

.online-floor,
.chat-floor,
.news-floor {
  min-height: min(760px, calc(100dvh - 175px));
  border-top: 1px solid var(--ya-line);
  background: #fff;
}

.world-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--ya-line);
}

.world-heading h2 {
  margin: 3px 0 0;
  color: var(--ya-ink);
  font-size: clamp(25px, 3vw, 40px);
  line-height: 1;
}

.world-heading-actions,
.join-code-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.join-code-form input {
  width: 150px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.online-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
  min-height: 245px;
  border-bottom: 1px solid var(--ya-line);
}

.online-feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-width: 0;
  padding: 28px 30px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(112deg, rgba(5, 85, 66, 0.98), rgba(8, 113, 90, 0.86)),
    #08715a;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.online-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.online-feature > span:last-child {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 5px;
}

.online-feature small {
  color: #f8d775;
  font-size: 11px;
  font-weight: 900;
}

.online-feature strong {
  font-size: clamp(32px, 5vw, 68px);
  line-height: 0.95;
}

.online-feature-art {
  position: absolute;
  inset: -38px -15px -65px 34%;
  transform: rotate(-9deg) perspective(500px) rotateX(57deg);
  transform-origin: center bottom;
}

.online-feature-art i {
  position: absolute;
  width: 22%;
  aspect-ratio: 1;
  border: 6px solid rgba(255, 255, 255, 0.78);
  background: rgba(239, 185, 47, 0.9);
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.18);
}

.online-feature-art i:nth-child(1) { left: 2%; top: 30%; }
.online-feature-art i:nth-child(2) { left: 24%; top: 30%; background: #fff; }
.online-feature-art i:nth-child(3) { left: 46%; top: 30%; background: #d63d53; }
.online-feature-art i:nth-child(4) { left: 46%; top: 52%; background: #fff; }
.online-feature-art i:nth-child(5) { left: 68%; top: 52%; background: #2475d9; }
.online-feature-art i:nth-child(6) { left: 68%; top: 74%; background: #efb92f; }

.online-mode-note {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 28px 30px;
  background: #f4c542;
  color: #302506;
}

.online-mode-note strong {
  font-size: 20px;
}

.online-mode-note span {
  font-size: 13px;
  line-height: 1.65;
}

.room-list-head,
.bulletin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 30px;
  border-bottom: 1px solid var(--ya-line);
}

.room-list-head > div,
.bulletin-section-head {
  gap: 9px;
}

.room-list-head strong,
.bulletin-section-head strong {
  font-size: 14px;
}

.room-list-head span,
.bulletin-section-head span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--ya-soft);
  color: var(--ya-muted);
  font-size: 11px;
  font-weight: 900;
}

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

.room-card {
  position: relative;
  display: grid;
  min-height: 185px;
  padding: 22px;
  border: 0;
  border-right: 1px solid var(--ya-line);
  border-bottom: 1px solid var(--ya-line);
  background: #fff;
  color: var(--ya-ink);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.room-card:hover {
  z-index: 1;
  background: #f8fafb;
}

.room-card:active {
  transform: scale(0.992);
}

.room-card-top,
.room-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-game-badge,
.room-mode-badge,
.room-visibility-badge {
  padding: 5px 7px;
  border-radius: 4px;
  background: var(--ya-soft);
  color: #566174;
  font-size: 10px;
  font-weight: 900;
}

.room-card-top {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.room-visibility-badge {
  margin-left: auto;
}

.room-visibility-badge.friends {
  background: #e8f3ff;
  color: #185c92;
}

.room-visibility-badge.private {
  background: #efedf8;
  color: #554878;
}

.room-mode-badge.battle {
  background: #ffe8ec;
  color: #a52037;
}

.room-card h3 {
  align-self: end;
  margin: 20px 0 5px;
  font-size: 21px;
  line-height: 1.2;
}

.room-card p {
  margin: 0;
  color: var(--ya-muted);
  font-size: 12px;
}

.room-card-foot {
  align-self: end;
  margin-top: 18px;
  font-size: 12px;
}

.room-card-foot strong {
  color: var(--ya-green);
}

.world-empty {
  margin: 0;
  padding: 30px;
  color: var(--ya-muted);
  font-size: 13px;
}

.chat-workspace {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr) 310px;
  min-height: min(760px, calc(100dvh - 175px));
}

.chat-sidebar,
.people-panel {
  min-width: 0;
  border-right: 1px solid var(--ya-line);
  background: #f7f8fa;
}

.people-panel.dm-profile-mode > :not(.dm-profile-card) {
  display: none;
}

.dm-profile-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 20px;
  text-align: center;
}

.dm-profile-card.hidden {
  display: none;
}

.dm-profile-card .profile-avatar {
  width: 72px;
  height: 72px;
  font-size: 20px;
}

.dm-profile-card > strong {
  margin-top: 7px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.dm-profile-card > small {
  color: var(--ya-muted);
  font-size: 9px;
  font-weight: 900;
}

.dm-profile-card > .primary {
  margin-top: 10px;
}

.duel-inbox {
  display: grid;
  width: 100%;
  gap: 8px;
  margin-top: 16px;
}

.duel-request-card {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--ya-line);
  border-radius: 7px;
  background: #f8fafb;
  text-align: left;
}

.duel-request-card > small {
  color: #a36d00;
  font-size: 9px;
  font-weight: 900;
}

.duel-request-card > span {
  color: var(--ya-muted);
  font-size: 11px;
}

.duel-request-card > div {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.duel-request-card button {
  padding: 7px 9px;
  border: 1px solid var(--ya-line);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.duel-balance-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.duel-balance-preview span {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--ya-line);
  border-radius: 6px;
  color: var(--ya-muted);
  font-size: 10px;
}

.duel-balance-preview strong {
  color: var(--ya-ink);
  font-size: 16px;
}

.dm-context-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  width: 180px;
  padding: 6px;
  border: 1px solid var(--ya-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(25, 34, 47, 0.2);
}

.dm-context-menu button {
  padding: 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.dm-context-menu button:hover {
  background: var(--ya-soft);
}

.people-panel {
  border-right: 0;
  border-left: 1px solid var(--ya-line);
  background: #fff;
}

.chat-sidebar-head,
.people-panel > header,
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 14px;
  padding: 0 17px;
  border-bottom: 1px solid var(--ya-line);
}

.chat-sidebar-head h2,
.people-panel h3 {
  margin: 2px 0 0;
  color: var(--ya-ink);
  font-size: 18px;
}

.channel-list,
.dm-list {
  display: grid;
  gap: 2px;
  padding: 12px 9px;
}

.channel-list button,
.dm-list button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 5px 9px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #596476;
  text-align: left;
  cursor: pointer;
}

.channel-list button:hover,
.channel-list button.active,
.dm-list button:hover,
.dm-list button.active {
  background: #e8ecef;
  color: var(--ya-ink);
}

.channel-list button > span,
.dm-list button > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ya-green);
  font-size: 11px;
  font-weight: 900;
}

.channel-list strong,
.dm-list strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 17px 6px;
  color: var(--ya-muted);
  font-size: 10px;
}

.dm-list-head strong {
  color: var(--ya-ink);
  font-size: 11px;
}

.chat-main {
  display: grid;
  min-width: 0;
  grid-template-rows: 72px minmax(300px, 1fr) auto;
  background: #fff;
}

.chat-header strong {
  display: block;
  font-size: 15px;
}

.chat-header span {
  display: block;
  margin-top: 3px;
  color: var(--ya-muted);
  font-size: 11px;
}

.message-list,
.room-message-list {
  min-height: 0;
  padding: 14px 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.message-list > .world-empty,
.room-message-list > .world-empty {
  display: grid;
  min-height: 100%;
  place-items: center;
  text-align: center;
}

.message-row {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 18px;
}

.message-row:hover {
  background: #f7f8fa;
}

.message-avatar,
.member-avatar,
.profile-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  font-weight: 950;
  box-shadow: 0 0 0 1px rgba(24, 32, 45, 0.12);
}

.ya-gold { background: #d99b0d; color: #281d00; }
.ya-mint { background: #159a75; }
.ya-ruby { background: #ce3650; }
.ya-indigo { background: #4c58c9; }
.ya-mono { background: #3a424e; }
.ya-sky { background: #2388cf; }

.message-content {
  min-width: 0;
}

.message-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 3px;
}

.message-meta strong {
  color: var(--ya-ink);
  font-size: 13px;
}

.message-meta span {
  color: #8791a1;
  font-size: 10px;
}

.message-content p {
  margin: 0;
  color: #303949;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.filtered-word {
  display: inline;
  padding: 0 2px;
  border: 0;
  border-radius: 3px;
  background: #dce1e7;
  color: transparent;
  cursor: pointer;
  user-select: none;
}

.filtered-word.revealed {
  background: #fff2b9;
  color: inherit;
  user-select: text;
}

.message-menu {
  align-self: start;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #8a94a4;
  opacity: 0;
  cursor: pointer;
}

.message-row:hover .message-menu {
  opacity: 1;
}

.message-composer,
.room-message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--ya-line);
  background: #fff;
}

.message-composer textarea {
  min-height: 42px;
  max-height: 130px;
  resize: none;
}

.people-panel > header {
  min-height: 72px;
}

.people-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 12px;
  border-bottom: 1px solid var(--ya-line);
}

.people-tabs {
  display: flex;
  gap: 3px;
  padding: 8px 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--ya-line);
}

.people-tabs button {
  flex: 0 0 auto;
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ya-muted);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.people-tabs button.active {
  background: var(--ya-ink);
  color: #fff;
}

.people-list {
  max-height: calc(100dvh - 360px);
  overflow: auto;
}

.person-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid #edf0f3;
}

.person-row > div {
  min-width: 0;
}

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

.person-row strong {
  font-size: 12px;
}

.person-row small {
  margin-top: 3px;
  color: var(--ya-muted);
  font-size: 10px;
}

.person-actions {
  display: flex;
  gap: 4px;
}

.person-actions button {
  min-width: 32px;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid var(--ya-line);
  border-radius: 5px;
  background: #fff;
  color: var(--ya-ink);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.bulletin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.announcement-stream {
  border-right: 1px solid var(--ya-line);
}

.announcement-item,
.release-item {
  display: grid;
  gap: 7px;
  padding: 20px 30px;
  border-bottom: 1px solid var(--ya-line);
}

.news-unread-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--ya-red);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  vertical-align: middle;
}

.news-unread-badge.hidden {
  display: none;
}

.announcement-meta,
.urgent-announcement-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.announcement-category,
.announcement-importance,
.urgent-announcement-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid #d7dee6;
  border-radius: 4px;
  background: #f5f7f9;
  color: #4e596a;
  font-size: 10px;
  font-weight: 850;
}

.announcement-item[data-importance="important"] .announcement-importance {
  border-color: #e8c868;
  background: #fff7d8;
  color: #765800;
}

.announcement-item[data-importance="urgent"] .announcement-importance {
  border-color: #ec9c9c;
  background: #fff0f0;
  color: #a12121;
}

.announcement-item.unread strong::after {
  content: "NEW";
  margin-left: 8px;
  color: var(--ya-red);
  font-size: 9px;
  font-weight: 950;
}

.announcement-item[data-importance="urgent"] {
  border-left: 4px solid var(--ya-red);
  padding-left: 26px;
}

.announcement-item[data-importance="important"] {
  border-left: 4px solid var(--ya-gold);
  padding-left: 26px;
}

.announcement-item time,
.release-item time {
  color: var(--ya-muted);
  font-size: 10px;
}

.urgent-announcement-layer {
  z-index: 430;
  background: rgba(21, 27, 39, 0.58);
}

.urgent-announcement-dialog {
  width: min(620px, 100%);
  border-top: 5px solid var(--ya-red);
}

.urgent-announcement-signal {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ya-red);
  font-size: 11px;
  font-weight: 950;
}

.urgent-announcement-signal span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(196, 47, 47, 0.12);
}

.urgent-announcement-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--ya-line);
  border-radius: 6px;
  overflow: hidden;
}

.urgent-announcement-list article {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: #fff;
}

.urgent-announcement-list article + article {
  border-top: 1px solid var(--ya-line);
}

.urgent-announcement-list strong {
  color: var(--ya-ink);
  font-size: 18px;
}

.urgent-announcement-list p {
  margin: 0;
  color: #3d4653;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.urgent-announcement-meta span {
  border-color: #ec9c9c;
  background: #fff0f0;
  color: #a12121;
}

.urgent-announcement-meta time {
  color: var(--ya-muted);
  font-size: 10px;
}

.announcement-item strong,
.release-item strong {
  color: var(--ya-ink);
  font-size: 16px;
}

.announcement-item p,
.release-item p {
  margin: 0;
  color: #4e596a;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.release-item {
  position: relative;
  padding-right: 64px;
  cursor: pointer;
}

.release-item:hover {
  background: #f8fafb;
}

.release-version {
  color: var(--ya-green);
  font-size: 11px;
  font-weight: 950;
}

.release-item::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 28px;
  color: #9ba4b2;
  font-size: 28px;
  transform: translateY(-50%);
}

.release-details {
  display: grid;
  gap: 18px;
}

.release-detail-group h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.release-detail-group ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #4f5a6a;
  font-size: 12px;
  line-height: 1.6;
}

.profile-settings {
  display: grid;
  gap: 13px;
  margin: 18px 0;
  padding: 18px 0;
  border-top: 1px solid var(--ya-line);
  border-bottom: 1px solid var(--ya-line);
}

.profile-settings-head {
  display: grid;
  gap: 3px;
}

.profile-settings-head small {
  color: var(--ya-muted);
  font-size: 10px;
}

.profile-settings fieldset,
.room-create-dialog fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-settings legend,
.room-create-dialog legend {
  margin-bottom: 7px;
  color: #485365;
  font-size: 11px;
  font-weight: 850;
}

.avatar-picker {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.avatar-picker label {
  cursor: pointer;
}

.avatar-picker input {
  position: absolute;
  opacity: 0;
}

.avatar-picker .profile-avatar {
  width: 34px;
  height: 34px;
}

.avatar-picker input:checked + .profile-avatar {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ya-gold);
}

.toggle-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-row span {
  display: grid;
  gap: 2px;
}

.toggle-row small {
  color: var(--ya-muted);
  font-size: 10px;
}

.toggle-row input {
  width: 42px;
  height: 23px;
  accent-color: var(--ya-green);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

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

.settings-consent-note {
  margin: 0;
  color: var(--ya-muted);
  font-size: 11px;
  line-height: 1.5;
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--ya-line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
}

.segmented-control input:checked + span {
  border-color: var(--ya-ink);
  background: var(--ya-ink);
  color: #fff;
}

.room-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.input-suffix {
  position: relative;
  display: block;
}

.input-suffix input {
  width: 100%;
  padding-right: 38px;
}

.input-suffix b {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--ya-muted);
  font-size: 12px;
  transform: translateY(-50%);
}

.room-stage {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  background: #fff;
}

.room-stage.hidden {
  display: none;
}

.room-stage-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--ya-line);
  background: rgba(255, 255, 255, 0.98);
}

.room-stage-title {
  display: grid;
  min-width: 0;
}

.room-stage-title span {
  color: var(--ya-green);
  font-size: 9px;
  font-weight: 950;
}

.room-stage-title strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-code {
  display: grid;
  gap: 1px;
  min-width: 84px;
  padding: 6px 10px;
  border: 1px solid var(--ya-line);
  border-radius: 6px;
  text-align: center;
}

.room-code span {
  color: var(--ya-muted);
  font-size: 8px;
  font-weight: 900;
}

.room-code strong {
  font-size: 12px;
}

.room-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ya-muted);
  font-size: 10px;
  font-weight: 800;
}

.room-sync i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1ca576;
  box-shadow: 0 0 0 4px rgba(28, 165, 118, 0.12);
}

.room-sync[data-state="retry"] i {
  background: var(--ya-gold);
  box-shadow: 0 0 0 4px rgba(239, 185, 47, 0.16);
}

.room-sync[data-state="offline"] i {
  background: var(--ya-red);
  box-shadow: 0 0 0 4px rgba(214, 61, 83, 0.14);
}

.room-stage-body {
  display: grid;
  min-height: 0;
  grid-template-columns: 230px minmax(0, 1fr) 290px;
}

.room-members-panel,
.room-chat-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--ya-line);
  background: #f7f8fa;
}

.room-chat-panel {
  border-right: 0;
  border-left: 1px solid var(--ya-line);
  background: #fff;
}

.room-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 14px;
  border-bottom: 1px solid var(--ya-line);
  color: var(--ya-muted);
  font-size: 10px;
  font-weight: 950;
}

#activeRoomMembers {
  display: grid;
  gap: 2px;
  padding: 9px;
  overflow: auto;
}

.room-member {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 5px 7px;
  border-radius: 6px;
}

.room-member.current-turn {
  background: #fff3c7;
}

.room-member .member-avatar {
  width: 34px;
  height: 34px;
}

.room-member > div {
  min-width: 0;
}

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

.room-member strong {
  font-size: 11px;
}

.room-member small {
  margin-top: 2px;
  color: var(--ya-muted);
  font-size: 9px;
}

.ready-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b7bec9;
}

.ready-light.ready {
  background: #1ca576;
}

.room-game-money {
  min-width: 52px;
  padding: 4px 6px;
  border: 1px solid #dfb337;
  border-radius: 4px;
  background: #fff3c2;
  color: #5b4200;
  font-size: 9px;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
}

.room-stake-lock {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 3px 8px;
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--ya-line);
  background: #fff;
}

.room-stake-lock span,
.room-stake-lock small {
  color: var(--ya-muted);
  font-size: 9px;
}

.room-stake-lock small {
  grid-column: 1 / -1;
}

.room-rules {
  margin: 0;
  border-top: 1px solid var(--ya-line);
  background: #fff;
}

.room-rules summary {
  padding: 10px 14px;
  color: var(--ya-ink);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.room-rules > div {
  display: grid;
  gap: 5px;
  max-height: 150px;
  overflow: auto;
  padding: 0 14px 12px;
}

.room-rules p {
  margin: 0;
  color: var(--ya-muted);
  font-size: 9px;
  line-height: 1.55;
}

.room-members-panel > button {
  margin: 8px 12px 0;
}

.room-members-panel > button:last-child {
  margin-bottom: 12px;
}

.room-start-feedback {
  min-height: 30px;
  margin: 7px 12px 0;
  color: var(--ya-muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.45;
}

.room-start-feedback[data-state="ready"] {
  color: var(--ya-green);
}

.room-start-feedback[data-state="loading"] {
  color: #8a6200;
}

.room-start-feedback[data-state="error"] {
  padding: 8px 9px;
  border: 1px solid rgba(214, 61, 83, 0.3);
  border-radius: 5px;
  background: rgba(214, 61, 83, 0.08);
  color: #a82036;
}

.room-game-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #edf1f2;
}

.room-waiting {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 30px;
  text-align: center;
}

.room-waiting.hidden {
  display: none;
}

.room-waiting-mark {
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--ya-gold);
  color: #302400;
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 18px 45px rgba(77, 63, 10, 0.2);
}

.room-waiting strong {
  color: var(--ya-ink);
  font-size: 22px;
}

.room-waiting p {
  max-width: 430px;
  margin: 9px 0 0;
  color: var(--ya-muted);
  font-size: 12px;
  line-height: 1.6;
}

.online-game-arena,
.yoshilife-stage {
  position: absolute;
  inset: 0;
}

.online-game-arena.hidden,
.yoshilife-stage.hidden {
  display: none;
}

.room-finished-actions {
  position: absolute;
  z-index: 12;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 7px;
  background: rgba(14, 22, 28, 0.94);
  color: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
}

.room-finished-actions.hidden {
  display: none;
}

.room-finished-actions > span {
  color: var(--ya-gold);
  font-size: 10px;
  font-weight: 900;
}

.room-finished-actions > strong {
  font-size: 18px;
}

.room-finished-actions > div {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.room-finished-actions .text-button {
  color: #fff;
}

.online-table {
  --table-felt: #08715a;
  --table-felt-deep: #04503f;
  --table-accent: #f4c644;
  --table-ink: #f8fbf9;
  position: relative;
  display: grid;
  height: 100%;
  min-height: 100%;
  overflow: auto;
  align-content: center;
  gap: clamp(14px, 2.2vh, 24px);
  padding: clamp(20px, 3.4vw, 48px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.12), transparent 65%),
    linear-gradient(145deg, var(--table-felt), var(--table-felt-deep));
  background-size: 26px 26px, 26px 26px, auto, auto;
  color: var(--table-ink);
  isolation: isolate;
  perspective: 1100px;
}

.online-table::before {
  position: absolute;
  z-index: -1;
  inset: 10px;
  border: 1px solid rgba(250, 217, 120, 0.42);
  box-shadow:
    inset 0 0 0 5px rgba(22, 40, 34, 0.15),
    inset 0 0 90px rgba(0, 0, 0, 0.12);
  content: "";
  pointer-events: none;
}

.online-coin-table {
  --table-felt: #173d5e;
  --table-felt-deep: #0b2338;
  --table-accent: #efc74c;
}

.online-dice-table {
  --table-felt: #8f2940;
  --table-felt-deep: #541526;
  --table-accent: #ffd268;
}

.online-poker-table {
  --table-felt: #08715a;
  --table-felt-deep: #044337;
}

.online-blackjack-table {
  --table-felt: #096a66;
  --table-felt-deep: #063f46;
  --table-accent: #f7cc54;
}

.online-table-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, 100%);
  margin-inline: auto;
  text-align: left;
}

.online-table-head small {
  color: var(--table-accent);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
}

.online-table-head h2 {
  margin: 5px 0 0;
  font-size: 38px;
  line-height: 1;
}

.online-table-meta {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  background: rgba(5, 24, 23, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
}

.online-table-meta > div {
  display: grid;
  min-width: 90px;
  min-height: 50px;
  align-content: center;
  padding: 7px 13px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.online-table-meta > div:first-child {
  border-left: 0;
}

.online-table-meta span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 8px;
  font-weight: 900;
}

.online-table-meta strong {
  margin-top: 2px;
  color: #fff;
  font-size: 14px;
}

.online-table-state {
  display: flex;
  justify-content: center;
  gap: 13px;
  flex-wrap: wrap;
}

.online-state-card {
  position: relative;
  display: grid;
  min-width: 112px;
  min-height: 82px;
  align-content: center;
  justify-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  background: rgba(2, 20, 18, 0.23);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.online-state-card.is-active {
  border-color: rgba(255, 221, 119, 0.74);
}

.online-state-card.is-locked::after {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #56e39f;
  box-shadow: 0 0 0 4px rgba(86, 227, 159, 0.15);
  content: "";
}

.online-state-card.is-winner {
  border-color: var(--table-accent);
  background: rgba(242, 191, 55, 0.16);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 0 30px rgba(244, 198, 68, 0.16);
}

.online-state-card span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
}

.online-state-card strong {
  margin-top: 5px;
  font-size: 22px;
}

.online-action-row {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}

.online-action-row button {
  min-width: 130px;
  min-height: 48px;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.online-card-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-playing-card {
  position: relative;
  display: block;
  width: 66px;
  aspect-ratio: 0.7;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), transparent 45%),
    #fff;
  color: var(--ya-ink);
  font-size: 16px;
  font-weight: 950;
  box-shadow:
    0 9px 18px rgba(0, 0, 0, 0.2),
    inset 0 0 0 2px rgba(255, 255, 255, 0.72);
  transform-origin: 50% 110%;
}

.state-changed .mini-playing-card {
  animation: onlineCardDeal 420ms cubic-bezier(0.18, 0.75, 0.22, 1) both;
}

.mini-playing-card:nth-child(2) {
  animation-delay: 35ms;
}

.mini-playing-card:nth-child(3) {
  animation-delay: 70ms;
}

.mini-playing-card:nth-child(4) {
  animation-delay: 105ms;
}

.mini-playing-card:nth-child(5) {
  animation-delay: 140ms;
}

.mini-playing-card.red {
  color: var(--ya-red);
}

.mini-playing-card.hidden-card {
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 6px),
    linear-gradient(145deg, #f3c338, #bb7b08);
  color: #3e2a00;
}

.mini-playing-card.hidden-card b {
  display: grid;
  width: 56%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(70, 42, 0, 0.3);
  border-radius: 50%;
  background: rgba(255, 245, 201, 0.65);
  font-size: 14px;
}

.card-corner {
  position: absolute;
  top: 5px;
  left: 6px;
  font-size: 11px;
  line-height: 1;
}

.card-corner.bottom {
  inset: auto 6px 5px auto;
  transform: rotate(180deg);
}

.card-center-suit {
  position: absolute;
  inset: 50% auto auto 50%;
  font-size: 27px;
  transform: translate(-50%, -50%);
}

.online-card-row.is-compact {
  gap: 0;
}

.online-card-row.is-compact .mini-playing-card {
  width: 37px;
  margin-left: -8px;
}

.online-card-row.is-compact .mini-playing-card:first-child {
  margin-left: 0;
}

.online-card-row.is-compact .card-corner,
.online-card-row.is-compact .card-center-suit {
  font-size: 8px;
}

.online-player-strip {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
}

.online-waiting-panel {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 12px;
  min-width: min(360px, 100%);
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  background: rgba(2, 20, 18, 0.23);
}

.online-waiting-panel > i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--table-accent);
  box-shadow: 0 0 0 0 rgba(255, 211, 100, 0.44);
  animation: tablePulse 1.5s ease-out infinite;
}

.online-waiting-panel > div {
  display: grid;
}

.online-waiting-panel strong {
  font-size: 12px;
}

.online-waiting-panel span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 9px;
}

.online-payout-board {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  width: min(900px, 100%);
  margin-inline: auto;
  padding: 10px;
  border: 1px solid rgba(255, 225, 124, 0.42);
  border-radius: 7px;
  background: rgba(3, 22, 21, 0.66);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.online-payout-title {
  padding-inline: 10px;
  color: var(--table-accent);
  font-size: 9px;
  font-weight: 950;
}

.online-payout-board .online-state-card {
  min-height: 58px;
}

.online-coin-stage {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 0.7fr);
  align-items: center;
  gap: 28px;
  width: min(780px, 100%);
  margin-inline: auto;
}

.online-coin-well {
  position: relative;
  display: grid;
  min-height: 230px;
  place-items: center;
}

.online-coin-well::before {
  position: absolute;
  width: min(330px, 86%);
  height: 120px;
  border: 1px solid rgba(255, 226, 123, 0.22);
  border-radius: 50%;
  box-shadow:
    inset 0 14px 34px rgba(0, 0, 0, 0.28),
    0 1px rgba(255, 255, 255, 0.16);
  content: "";
  transform: translateY(55px);
}

.versus-coin {
  position: relative;
  z-index: 2;
  width: 170px;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(10deg);
}

.online-coin-stage.choosing .versus-coin {
  animation: coinIdle 2.4s ease-in-out infinite;
}

.state-changed .online-coin-stage.revealed .versus-coin.show-heads {
  animation: coinRevealHeads 1.35s cubic-bezier(0.12, 0.7, 0.18, 1) both;
}

.state-changed .online-coin-stage.revealed .versus-coin.show-tails {
  animation: coinRevealTails 1.35s cubic-bezier(0.12, 0.7, 0.18, 1) both;
}

.versus-coin.show-heads {
  transform: rotateX(10deg) rotateY(0deg);
}

.versus-coin.show-tails {
  transform: rotateX(10deg) rotateY(180deg);
}

.versus-coin-face {
  position: absolute;
  display: grid;
  inset: 0;
  place-items: center;
  border: 10px solid #f6cf5b;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, #fff0a8, transparent 20%),
    radial-gradient(circle, #f2bf35 0 56%, #b6790a 58% 64%, #f2c84d 66%);
  color: #493100;
  font-size: 43px;
  font-weight: 1000;
  box-shadow:
    inset 0 0 0 4px rgba(111, 70, 0, 0.18),
    inset 12px 10px 16px rgba(255, 250, 197, 0.5),
    inset -15px -14px 18px rgba(102, 53, 0, 0.24),
    0 20px 34px rgba(0, 0, 0, 0.27);
  backface-visibility: hidden;
}

.versus-coin-face::after {
  position: absolute;
  inset: 13px;
  border: 2px dashed rgba(91, 53, 0, 0.28);
  border-radius: 50%;
  content: "";
}

.versus-coin-face.tails {
  transform: rotateY(180deg);
}

.versus-coin-shadow {
  position: absolute;
  bottom: 25px;
  width: 140px;
  height: 25px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  filter: blur(8px);
}

.coin-reveal-copy {
  display: grid;
  align-content: center;
  min-height: 120px;
  padding: 20px;
  border-left: 2px solid var(--table-accent);
}

.coin-reveal-copy span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  font-weight: 950;
}

.coin-reveal-copy strong {
  margin-top: 8px;
  font-size: 27px;
}

.coin-choice-row button {
  min-width: 170px;
}

.online-dice-stage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 13px;
  width: min(900px, 100%);
  margin-inline: auto;
}

.dice-player-tray {
  position: relative;
  min-height: 190px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 45%),
    rgba(39, 4, 14, 0.28);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 15px 30px rgba(41, 4, 15, 0.18);
}

.dice-player-tray.is-me {
  border-color: rgba(255, 219, 112, 0.7);
}

.dice-player-tray.is-winner {
  background: rgba(255, 211, 93, 0.15);
  box-shadow: 0 0 35px rgba(255, 203, 69, 0.24);
}

.dice-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dice-player-head strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dice-player-head span {
  color: var(--table-accent);
  font-size: 9px;
  font-weight: 950;
}

.versus-dice-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 25px;
  perspective: 600px;
}

.versus-die {
  position: relative;
  display: grid;
  width: 76px;
  aspect-ratio: 1;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 12px;
  border: 1px solid rgba(70, 19, 25, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(145deg, #fff, #e8ddd9);
  box-shadow:
    inset 5px 5px 9px rgba(255, 255, 255, 0.84),
    inset -7px -7px 12px rgba(82, 34, 36, 0.15),
    0 15px 18px rgba(24, 0, 8, 0.28);
  transform: rotateX(10deg) rotateY(calc((var(--die-index) * 2 - 1) * 7deg));
  transform-style: preserve-3d;
}

.state-changed .versus-die:not(.is-waiting) {
  animation: onlineDieRoll 640ms cubic-bezier(0.18, 0.75, 0.22, 1) both;
}

.versus-die i {
  display: none;
  width: 12px;
  height: 12px;
  align-self: center;
  justify-self: center;
  border-radius: 50%;
  background: #46101e;
  box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.38);
}

.versus-die[data-value="1"] i:nth-child(5),
.versus-die[data-value="2"] i:nth-child(1),
.versus-die[data-value="2"] i:nth-child(9),
.versus-die[data-value="3"] i:nth-child(1),
.versus-die[data-value="3"] i:nth-child(5),
.versus-die[data-value="3"] i:nth-child(9),
.versus-die[data-value="4"] i:nth-child(1),
.versus-die[data-value="4"] i:nth-child(3),
.versus-die[data-value="4"] i:nth-child(7),
.versus-die[data-value="4"] i:nth-child(9),
.versus-die[data-value="5"] i:nth-child(1),
.versus-die[data-value="5"] i:nth-child(3),
.versus-die[data-value="5"] i:nth-child(5),
.versus-die[data-value="5"] i:nth-child(7),
.versus-die[data-value="5"] i:nth-child(9),
.versus-die[data-value="6"] i:nth-child(1),
.versus-die[data-value="6"] i:nth-child(3),
.versus-die[data-value="6"] i:nth-child(4),
.versus-die[data-value="6"] i:nth-child(6),
.versus-die[data-value="6"] i:nth-child(7),
.versus-die[data-value="6"] i:nth-child(9) {
  display: block;
}

.versus-die.is-waiting {
  opacity: 0.34;
}

.versus-die.is-waiting::after {
  position: absolute;
  inset: 50% auto auto 50%;
  color: #5e2834;
  content: "?";
  font-size: 25px;
  font-weight: 950;
  transform: translate(-50%, -50%);
}

.online-poker-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(190px, auto) auto;
  gap: 10px;
  width: min(1000px, 100%);
  margin-inline: auto;
  padding: 12px 30px 18px;
}

.online-poker-stage::before {
  position: absolute;
  z-index: -1;
  inset: 4% 0 11%;
  border: 5px solid #b88232;
  border-radius: 50%;
  background: rgba(0, 53, 42, 0.22);
  box-shadow:
    0 0 0 6px rgba(50, 25, 4, 0.35),
    inset 0 0 45px rgba(0, 0, 0, 0.18);
  content: "";
}

.poker-opponents {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.poker-opponent-seat {
  display: grid;
  min-width: 120px;
  justify-items: center;
  gap: 5px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: rgba(2, 31, 26, 0.48);
}

.poker-opponent-seat.is-winner {
  border-color: var(--table-accent);
  box-shadow: 0 0 26px rgba(244, 198, 68, 0.2);
}

.poker-opponent-seat > strong {
  max-width: 110px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poker-decision {
  color: rgba(255, 255, 255, 0.66);
  font-size: 8px;
  font-weight: 950;
}

.poker-board {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
}

.poker-zone-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.poker-zone-label span {
  color: var(--table-accent);
  font-size: 9px;
  font-weight: 950;
}

.poker-zone-label strong {
  color: rgba(255, 255, 255, 0.6);
  font-size: 8px;
}

.online-card-row.is-community .mini-playing-card {
  width: 72px;
}

.poker-hero-seat {
  display: grid;
  justify-self: center;
  justify-items: center;
  gap: 8px;
  min-width: 270px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  background: rgba(1, 28, 23, 0.6);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.poker-hero-seat.is-winner {
  border-color: var(--table-accent);
  background: rgba(147, 104, 9, 0.34);
}

.poker-hero-seat > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

.poker-hero-seat > div:first-child strong {
  color: var(--table-accent);
  font-size: 9px;
}

.poker-hero-seat > div:first-child span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
}

.online-blackjack-stage {
  position: relative;
  display: grid;
  gap: 20px;
  width: min(1040px, 100%);
  margin-inline: auto;
  padding: 12px 20px 4px;
}

.online-blackjack-stage::before {
  position: absolute;
  z-index: -1;
  inset: 1% 5% 5%;
  border: 2px solid rgba(245, 207, 88, 0.38);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  content: "";
}

.blackjack-dealer-zone {
  display: grid;
  justify-self: center;
  justify-items: center;
  gap: 9px;
  min-width: 260px;
}

.blackjack-dealer-zone > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.blackjack-dealer-zone strong,
.blackjack-dealer-zone span {
  font-size: 10px;
}

.blackjack-dealer-zone span {
  color: var(--table-accent);
  font-weight: 950;
}

.blackjack-seats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 11px;
}

.blackjack-player-seat {
  position: relative;
  display: grid;
  min-height: 170px;
  align-content: center;
  justify-items: center;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  background: rgba(2, 35, 34, 0.33);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.blackjack-player-seat.is-me {
  border-color: rgba(255, 224, 124, 0.6);
}

.blackjack-player-seat.is-turn {
  border-color: var(--table-accent);
  background: rgba(244, 198, 68, 0.14);
  box-shadow: 0 0 0 4px rgba(244, 198, 68, 0.08), 0 16px 38px rgba(0, 0, 0, 0.16);
  transform: translateY(-3px);
}

.blackjack-player-seat.is-winner {
  box-shadow: 0 0 30px rgba(244, 198, 68, 0.24);
}

.blackjack-player-seat > span {
  max-width: 150px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blackjack-player-seat > div:last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.blackjack-player-seat > div:last-child strong {
  color: #fff;
  font-size: 20px;
}

.blackjack-player-seat > div:last-child span {
  color: var(--table-accent);
  font-size: 8px;
  font-weight: 950;
}

@keyframes onlineCardDeal {
  from {
    opacity: 0;
    transform: translate(55px, -36px) rotate(8deg);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
  }
}

@keyframes tablePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 211, 100, 0.42); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(255, 211, 100, 0); }
}

@keyframes coinIdle {
  0%, 100% { transform: translateY(0) rotateX(10deg) rotateY(0); }
  50% { transform: translateY(-11px) rotateX(10deg) rotateY(16deg); }
}

@keyframes coinRevealHeads {
  0% { transform: translateY(80px) rotateX(10deg) rotateY(0); }
  48% { transform: translateY(-110px) rotateX(20deg) rotateY(1260deg); }
  100% { transform: translateY(0) rotateX(10deg) rotateY(1440deg); }
}

@keyframes coinRevealTails {
  0% { transform: translateY(80px) rotateX(10deg) rotateY(0); }
  48% { transform: translateY(-110px) rotateX(20deg) rotateY(1350deg); }
  100% { transform: translateY(0) rotateX(10deg) rotateY(1620deg); }
}

@keyframes onlineDieRoll {
  0% { opacity: 0.4; transform: translateY(-60px) rotateX(-90deg) rotateY(0); }
  65% { opacity: 1; transform: translateY(7px) rotateX(390deg) rotateY(270deg); }
  100% { transform: translateY(0) rotateX(10deg) rotateY(calc((var(--die-index) * 2 - 1) * 7deg)); }
}

.yoshilife-stage {
  background: #dce8e3;
}

#yoshilifeCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.yoshilife-hud {
  position: absolute;
  top: 16px;
  right: 16px;
  left: 16px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 100px 90px auto 42px;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.yoshilife-hud > * {
  pointer-events: auto;
}

.turn-indicator,
.yoshilife-bank,
.dice-readout {
  display: grid;
  min-height: 50px;
  align-content: center;
  gap: 2px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(20, 41, 34, 0.12);
}

.turn-indicator span,
.yoshilife-bank span,
.dice-readout span {
  color: var(--ya-muted);
  font-size: 8px;
  font-weight: 950;
}

.turn-indicator strong,
.yoshilife-bank strong,
.dice-readout strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yoshilife-bank {
  justify-items: center;
}

.yoshilife-bank strong {
  color: #805b00;
  font-size: 13px;
}

.yoshilife-bank b {
  font-size: 17px;
}

.dice-readout {
  justify-items: center;
}

.dice-readout strong {
  font-size: 20px;
}

.yoshilife-event {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  max-width: min(330px, calc(100% - 36px));
  gap: 4px;
  padding: 12px 15px;
  border-left: 4px solid var(--ya-gold);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ya-ink);
  box-shadow: var(--ya-shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.yoshilife-event.show {
  opacity: 1;
  transform: translateY(0);
}

.yoshilife-event strong {
  font-size: 13px;
}

.yoshilife-event span {
  color: var(--ya-muted);
  font-size: 11px;
}

.room-chat-panel .room-message-list {
  flex: 1 1 auto;
}

.room-chat-panel .message-row {
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 7px 11px;
}

.room-chat-panel .message-avatar {
  width: 28px;
  height: 28px;
  font-size: 7px;
}

.room-chat-panel .message-menu {
  display: none;
}

.room-message-form {
  padding: 9px;
}

.room-message-form input {
  min-width: 0;
}

@media (max-width: 1180px) {
  .top-experience-nav button {
    min-width: 70px;
    padding-inline: 8px;
    font-size: 12px;
  }

  .chat-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .people-panel {
    position: absolute;
    z-index: 20;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(330px, 92vw);
    box-shadow: -18px 0 50px rgba(24, 32, 45, 0.16);
    transform: translateX(105%);
    transition: transform 180ms ease;
  }

  .people-panel.open {
    transform: translateX(0);
  }

  .chat-floor {
    position: relative;
    overflow: hidden;
  }

  .room-stage-body {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .room-chat-panel {
    position: absolute;
    z-index: 10;
    top: 64px;
    right: 0;
    bottom: 0;
    width: min(310px, 92vw);
    box-shadow: -18px 0 55px rgba(24, 32, 45, 0.18);
  }

  .room-stage-body.chat-closed .room-chat-panel {
    display: none;
  }

  .room-chat-button {
    display: grid;
  }
}

@media (max-width: 900px) {
  .top-experience-nav {
    display: none;
  }

  .floor-head {
    display: none !important;
  }

  .online-floor,
  .chat-floor,
  .news-floor {
    min-height: calc(100dvh - 112px);
    border-top: 0;
  }

  .world-heading {
    align-items: stretch;
    flex-direction: column;
    padding: 20px 16px 16px;
  }

  .world-heading h2 {
    font-size: 28px;
  }

  .world-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .join-code-form input {
    width: 100%;
  }

  .online-featured {
    display: block;
  }

  .online-feature {
    width: 100%;
    min-height: 230px;
    border-right: 0;
  }

  .online-feature strong {
    font-size: 47px;
  }

  .online-mode-note {
    padding: 18px 16px;
  }

  .room-list-head,
  .bulletin-section-head {
    padding-inline: 16px;
  }

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

  .room-card {
    min-height: 154px;
    border-right: 0;
    padding: 18px 16px;
  }

  .chat-workspace {
    grid-template-columns: 1fr;
    min-height: calc(100dvh - 112px);
  }

  .chat-sidebar {
    position: fixed;
    z-index: 80;
    top: 56px;
    bottom: calc(54px + env(safe-area-inset-bottom));
    left: 0;
    display: block;
    width: min(280px, 88vw);
    box-shadow: 18px 0 50px rgba(24, 32, 45, 0.18);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .chat-sidebar.mobile-open {
    transform: translateX(0);
  }

  .chat-main {
    grid-template-rows: 60px minmax(260px, 1fr) auto;
    max-height: calc(100dvh - 112px);
  }

  .chat-header {
    min-height: 60px;
  }

  .mobile-channel-button {
    display: grid;
  }

  .message-row {
    grid-template-columns: 36px minmax(0, 1fr) 24px;
    padding: 8px 12px;
  }

  .message-avatar {
    width: 34px;
    height: 34px;
  }

  .message-menu {
    opacity: 1;
  }

  .message-composer {
    padding: 9px 9px calc(9px + env(safe-area-inset-bottom));
  }

  .bulletin-layout {
    grid-template-columns: 1fr;
  }

  .announcement-stream {
    border-right: 0;
  }

  .announcement-item,
  .release-item {
    padding: 17px 16px;
  }

  .release-item {
    padding-right: 48px;
  }

  .room-stage {
    grid-template-rows: 56px minmax(0, 1fr);
  }

  .room-stage-header {
    grid-template-columns: 38px 38px minmax(0, 1fr) auto 38px;
    padding: 0 9px;
  }

  .room-members-button,
  .room-chat-button {
    display: grid;
  }

  .room-code {
    min-width: 70px;
    padding: 5px 7px;
  }

  .room-sync {
    display: none;
  }

  .room-stage-body {
    display: block;
    position: relative;
  }

  .room-members-panel {
    position: absolute;
    z-index: 12;
    inset: 0 auto 0 0;
    width: min(245px, 86vw);
    box-shadow: 18px 0 50px rgba(24, 32, 45, 0.18);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .room-stage-body.members-open .room-members-panel {
    transform: translateX(0);
  }

  .room-game-stage {
    width: 100%;
    height: 100%;
  }

  .online-table {
    min-height: 100%;
    align-content: start;
    padding: 18px 13px 28px;
  }

  .online-table::before {
    inset: 5px;
  }

  .online-table-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .online-table-head h2 {
    font-size: 27px;
  }

  .online-table-meta {
    width: 100%;
  }

  .online-table-meta > div {
    min-width: 0;
    flex: 1 1 0;
    min-height: 43px;
  }

  .online-coin-stage {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .online-coin-well {
    min-height: 200px;
  }

  .versus-coin {
    width: 145px;
  }

  .coin-reveal-copy {
    min-height: auto;
    padding: 9px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 0;
    text-align: center;
  }

  .online-dice-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dice-player-tray {
    min-height: 158px;
    padding: 11px;
  }

  .versus-dice-row {
    gap: 9px;
    margin-top: 18px;
  }

  .versus-die {
    width: 60px;
    padding: 9px;
    border-radius: 11px;
  }

  .versus-die i {
    width: 9px;
    height: 9px;
  }

  .online-poker-stage {
    grid-template-rows: auto auto auto;
    padding: 5px 4px 12px;
  }

  .online-poker-stage::before {
    inset: 2% 0 8%;
  }

  .poker-opponents {
    overflow-x: auto;
    justify-content: start;
    padding: 2px;
    scrollbar-width: none;
  }

  .poker-opponents::-webkit-scrollbar {
    display: none;
  }

  .poker-opponent-seat {
    flex: 0 0 120px;
    min-width: 120px;
  }

  .poker-opponent-seat .online-card-row.is-compact {
    flex-wrap: nowrap;
  }

  .online-card-row.is-community {
    gap: 5px;
    flex-wrap: nowrap;
  }

  .online-card-row.is-community .mini-playing-card {
    width: 55px;
  }

  .online-blackjack-stage {
    gap: 13px;
    padding: 4px;
  }

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

  .blackjack-player-seat {
    min-height: 150px;
    padding: 10px;
  }

  .blackjack-player-seat .mini-playing-card {
    width: 52px;
  }

  .room-chat-panel {
    top: 56px;
  }

  .yoshilife-hud {
    top: 9px;
    right: 9px;
    left: 9px;
    grid-template-columns: minmax(0, 1fr) 74px 56px 48px;
  }

  .yoshilife-bank {
    min-height: 48px;
    padding: 5px 7px;
  }

  .yoshilife-bank strong {
    font-size: 9px;
  }

  .yoshilife-bank b {
    font-size: 13px;
  }

  .yoshilife-hud .primary {
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .yoshilife-hud .primary::before {
    content: "ROLL";
    font-size: 10px;
  }

  #yoshilifeOverview {
    position: absolute;
    right: 0;
    top: 58px;
  }

  .yoshilife-event {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
  }

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

@media (max-width: 520px) {
  .top-actions .connection-pill,
  .top-actions .desktop-admin,
  .top-actions #historyButton {
    display: none;
  }

  .online-feature {
    min-height: 210px;
    padding: 20px 16px;
  }

  .online-feature-art {
    inset: -20px -45px -60px 25%;
  }

  .online-feature strong {
    font-size: 40px;
  }

  .people-panel {
    width: 100%;
  }

  .room-chat-panel {
    width: 100%;
  }

  .room-stage-title span {
    display: none;
  }

  .room-stage-title strong {
    font-size: 13px;
  }

  .online-table {
    gap: 13px;
    padding: 14px 9px 22px;
  }

  .online-table-head h2 {
    font-size: 23px;
  }

  .online-table-meta > div {
    padding: 5px 7px;
  }

  .online-table-meta strong {
    font-size: 11px;
  }

  .online-state-card {
    min-width: 91px;
    min-height: 64px;
    padding: 8px;
  }

  .online-state-card strong {
    font-size: 16px;
  }

  .online-coin-well {
    min-height: 170px;
  }

  .online-coin-well::before {
    height: 88px;
    transform: translateY(43px);
  }

  .versus-coin {
    width: 124px;
  }

  .versus-coin-face {
    border-width: 7px;
    font-size: 31px;
  }

  .coin-choice-row {
    flex-wrap: nowrap;
  }

  .coin-choice-row button {
    min-width: 0;
    flex: 1 1 0;
  }

  .online-dice-stage {
    gap: 7px;
  }

  .online-dice-table {
    align-content: center;
  }

  .dice-player-tray {
    min-height: 137px;
    padding: 9px 7px;
  }

  .dice-player-head {
    align-items: start;
    flex-direction: column;
  }

  .versus-dice-row {
    gap: 6px;
    margin-top: 13px;
  }

  .versus-die {
    width: 48px;
    padding: 7px;
    border-radius: 9px;
  }

  .versus-die i {
    width: 7px;
    height: 7px;
  }

  .poker-zone-label strong {
    display: none;
  }

  .online-card-row.is-community {
    gap: 3px;
  }

  .online-card-row.is-community .mini-playing-card {
    width: 48px;
  }

  .poker-hero-seat {
    min-width: 245px;
    padding: 8px 12px;
  }

  .poker-hero-seat .mini-playing-card {
    width: 57px;
  }

  .blackjack-dealer-zone {
    min-width: 230px;
  }

  .blackjack-dealer-zone .mini-playing-card {
    width: 54px;
  }

  .blackjack-seats {
    gap: 7px;
  }

  .blackjack-player-seat {
    min-height: 132px;
    padding: 8px 5px;
  }

  .blackjack-player-seat .online-card-row {
    gap: 3px;
    flex-wrap: nowrap;
  }

  .blackjack-player-seat .mini-playing-card {
    width: 42px;
  }

  .blackjack-player-seat > div:last-child strong {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .people-panel,
  .room-members-panel,
  .filtered-word,
  .room-card,
  .yoshilife-event,
  .versus-coin,
  .versus-die,
  .mini-playing-card,
  .online-waiting-panel > i {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
