.entry-mode-wrap {
  display: grid;
  gap: 8px;
}

.entry-mode-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.entry-mode-list button {
  min-height: 58px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(237, 244, 239, 0.14);
  border-radius: 6px;
  background: rgba(237, 244, 239, 0.06);
  color: #edf4ef;
  text-align: left;
  cursor: pointer;
}

.entry-mode-list button.active {
  border-color: rgba(255, 209, 102, 0.78);
  background: rgba(255, 209, 102, 0.12);
}

.entry-mode-list strong {
  font-size: 14px;
}

.entry-mode-list span {
  color: rgba(237, 244, 239, 0.62);
  font-size: 11px;
  font-weight: 800;
}

.entry-room-status {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(142, 216, 255, 0.18);
  border-radius: 7px;
  background: rgba(142, 216, 255, 0.055);
}

.entry-room-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.entry-room-title span {
  color: rgba(142, 216, 255, 0.76);
  font-size: 11px;
  font-weight: 900;
}

.entry-room-title strong {
  min-width: 0;
  overflow: hidden;
  color: #edf4ef;
  font-size: 15px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-room-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.entry-room-fact {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(237, 244, 239, 0.11);
  border-radius: 6px;
  background: rgba(2, 5, 4, 0.3);
}

.entry-room-fact span {
  color: rgba(237, 244, 239, 0.5);
  font-size: 10px;
  font-weight: 900;
}

.entry-room-fact strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(237, 244, 239, 0.9);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-online-rooms {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}

.entry-online-rooms.hidden {
  display: none;
}

.entry-online-head {
  display: grid;
  gap: 6px;
}

.entry-online-head span {
  color: #ffd166;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.entry-online-head strong {
  color: #edf4ef;
  font-size: 22px;
  font-weight: 950;
}

.entry-online-head p {
  max-width: 560px;
  margin: 0;
  color: rgba(237, 244, 239, 0.66);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.entry-online-toolbar {
  display: flex;
  gap: 8px;
}

.entry-online-toolbar button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(237, 244, 239, 0.16);
  border-radius: 6px;
  background: rgba(237, 244, 239, 0.07);
  color: #edf4ef;
  font-weight: 900;
  cursor: pointer;
}

.entry-online-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.entry-online-room-wrap {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: stretch;
}

.entry-online-room {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px 14px;
  padding: 13px;
  border: 1px solid rgba(237, 244, 239, 0.14);
  border-radius: 7px;
  background: rgba(237, 244, 239, 0.06);
  color: #edf4ef;
  text-align: left;
  box-shadow: inset 3px 0 0 rgba(126, 222, 161, 0.48);
  cursor: pointer;
}

.entry-online-room:hover:not(:disabled),
.entry-online-room:focus-visible:not(:disabled) {
  border-color: rgba(255, 209, 102, 0.48);
  background: rgba(237, 244, 239, 0.1);
}

.entry-online-room[data-phase="playing"] {
  box-shadow: inset 3px 0 0 rgba(129, 190, 255, 0.72);
}

.entry-online-room[data-phase="loading"] {
  box-shadow: inset 3px 0 0 rgba(255, 209, 102, 0.72);
}

.entry-online-room[data-phase="ended"] {
  box-shadow: inset 3px 0 0 rgba(255, 109, 102, 0.58);
}

.entry-online-room:disabled {
  cursor: default;
  opacity: 0.54;
}

.entry-online-room-main,
.entry-online-room-meta {
  grid-column: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.entry-online-room-main strong {
  overflow: hidden;
  color: #edf4ef;
  font-size: 15px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-online-room-main small,
.entry-online-room-meta em {
  min-width: 0;
  overflow: hidden;
  color: rgba(237, 244, 239, 0.62);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-online-room b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  min-width: 78px;
  max-width: 92px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 209, 102, 0.34);
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.11);
  color: #ffd166;
  font-size: 12px;
  text-align: center;
}

.entry-online-room.is-spectator-join b {
  border-color: rgba(190, 170, 255, 0.42);
  background: rgba(190, 170, 255, 0.14);
  color: #ded4ff;
}

.entry-online-spectator {
  min-height: 100%;
  padding: 10px;
  border: 1px solid rgba(190, 170, 255, 0.32);
  border-radius: 7px;
  background: rgba(190, 170, 255, 0.1);
  color: #ded4ff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.3;
  cursor: pointer;
}

.entry-online-spectator:hover,
.entry-online-spectator:focus-visible {
  border-color: rgba(190, 170, 255, 0.58);
  background: rgba(190, 170, 255, 0.16);
}

.entry-online-empty {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid rgba(237, 244, 239, 0.12);
  border-radius: 7px;
  background: rgba(237, 244, 239, 0.05);
  color: rgba(237, 244, 239, 0.68);
}

.entry-online-empty strong {
  color: #edf4ef;
}

.entry-skin-detail {
  display: grid;
  gap: 8px;
  min-height: 122px;
  padding: 12px;
  border: 1px solid rgba(255, 209, 102, 0.18);
  border-radius: 7px;
  background: rgba(255, 209, 102, 0.06);
  box-shadow: inset 3px 0 0 rgba(255, 209, 102, 0.34);
}

.entry-skin-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.entry-skin-detail-head span {
  color: rgba(255, 209, 102, 0.76);
  font-size: 11px;
  font-weight: 900;
}

.entry-skin-detail-head strong {
  color: #edf4ef;
  font-size: 15px;
}

.entry-skin-detail p {
  margin: 0;
  color: rgba(237, 244, 239, 0.7);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.entry-skin-detail .entry-skin-tagline {
  color: #ffd166;
  font-size: 13px;
  font-weight: 950;
}

.entry-skin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.entry-skin-meta span {
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(237, 244, 239, 0.12);
  border-radius: 999px;
  background: rgba(237, 244, 239, 0.06);
  color: rgba(237, 244, 239, 0.64);
  font-size: 10px;
  font-weight: 900;
}

.room-list-screen {
  position: fixed;
  inset: 0;
  z-index: 29;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  isolation: isolate;
  background: #060b09;
}

.room-list-screen::before,
.room-list-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.room-list-screen::before {
  z-index: -2;
  background-image:
    linear-gradient(90deg, rgba(3, 6, 5, 0.5), rgba(3, 6, 5, 0.28) 46%, rgba(3, 6, 5, 0.66)),
    url("../assets/ui/main-background.png");
  background-position: center;
  background-size: cover;
  filter: saturate(0.82) contrast(1.04);
}

.room-list-screen::after {
  z-index: -1;
  background:
    radial-gradient(circle at 34% 50%, rgba(0, 0, 0, 0.04), transparent 0 32%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.38), transparent 42%, rgba(0, 0, 0, 0.72));
}

.room-list-screen.hidden {
  display: none;
}

.room-list-card {
  width: min(720px, calc(100vw - 48px));
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(4, 8, 7, 0.72);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.room-list-head h2 {
  margin: 0;
  color: #edf4ef;
  font-size: 30px;
  line-height: 1.05;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.62);
}

.room-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-list-toolbar button,
.room-list-item {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

.room-list-toolbar button {
  min-height: 42px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.94);
  color: #070807;
  font-weight: 900;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.24);
}

.room-list-toolbar .room-list-muted {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.36);
  color: rgba(237, 244, 239, 0.92);
}

.room-list-toolbar button.active {
  border-color: rgba(255, 209, 102, 0.72);
  background: rgba(255, 209, 102, 0.92);
  color: #070807;
}

.room-create-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-radius: 7px;
  background: rgba(7, 10, 9, 0.62);
}

.room-create-panel.hidden {
  display: none;
}

.room-create-panel label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: rgba(237, 244, 239, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.room-create-panel input,
.room-create-panel select {
  width: 100%;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid rgba(237, 244, 239, 0.18);
  border-radius: 6px;
  background: rgba(2, 5, 4, 0.72);
  color: #edf4ef;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

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

.room-create-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.room-create-check input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.room-create-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.room-create-actions button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #070807;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.room-create-actions .room-list-muted {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.36);
  color: rgba(237, 244, 239, 0.92);
}

.room-list-items {
  display: grid;
  gap: 8px;
}

.room-list-item-wrap {
  display: block;
}

.room-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(7, 10, 9, 0.56);
  color: #edf4ef;
  text-align: left;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.room-list-item:hover:not(:disabled),
.room-list-item:focus-visible:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.room-list-item:disabled {
  cursor: default;
  opacity: 0.58;
}

.room-list-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.room-list-title strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-list-title small {
  color: rgba(237, 244, 239, 0.64);
  font-size: 13px;
  font-weight: 800;
}

.room-list-action {
  min-width: 64px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #070807;
  font-size: 13px;
  font-weight: 950;
  text-align: center;
}

.room-list-item:disabled .room-list-action {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(237, 244, 239, 0.76);
}

.room-list-empty {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(7, 10, 9, 0.48);
  color: rgba(237, 244, 239, 0.7);
}

.room-list-empty strong {
  color: #edf4ef;
}

.online-admin-start-notice {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid rgba(129, 190, 255, 0.28);
  border-radius: 7px;
  background: rgba(39, 83, 114, 0.18);
  color: #dff0ff;
  font-weight: 900;
}

.online-admin-start-notice.hidden {
  display: none;
}

.online-host-settings {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 8px;
  background: rgba(255, 209, 102, 0.07);
}

.lobby-summary.hidden,
.lobby-actions .hidden {
  display: none !important;
}

.lobby-header {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.lobby-header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.lobby-header-meta span {
  min-width: 78px;
  padding: 7px 10px;
  border: 1px solid rgba(237, 244, 239, 0.12);
  border-radius: 7px;
  background: rgba(237, 244, 239, 0.06);
}

.lobby-header-meta small {
  display: block;
  color: rgba(237, 244, 239, 0.55);
  font-size: 10px;
  font-weight: 900;
}

.lobby-header-meta strong {
  display: block;
  margin-top: 2px;
  color: #edf4ef;
  font-size: 13px;
}

.online-host-toggle.active {
  border-color: rgba(255, 209, 102, 0.72);
  background: rgba(255, 209, 102, 0.12);
}

.online-host-start {
  min-height: 42px;
  border: 1px solid rgba(255, 209, 102, 0.68);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.95), rgba(216, 155, 54, 0.95));
  color: #0b0d09;
  font: 1000 15px Inter, system-ui, sans-serif;
  cursor: pointer;
}

.online-host-settings.hidden {
  display: none;
}

.online-host-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.online-host-head span {
  color: rgba(237, 244, 239, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.online-host-settings label {
  display: grid;
  gap: 6px;
  color: rgba(237, 244, 239, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.online-host-settings select {
  min-height: 38px;
  border: 1px solid rgba(237, 244, 239, 0.16);
  border-radius: 6px;
  background: rgba(5, 9, 8, 0.72);
  color: #edf4ef;
  font: inherit;
}

.online-host-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

@media (max-width: 760px) {
  .lobby-header {
    grid-template-columns: 1fr;
  }

  .lobby-header-meta {
    justify-content: stretch;
  }

  .lobby-header-meta span {
    flex: 1 1 88px;
  }

  .entry-mode-list,
  .entry-room-grid,
  .room-create-grid,
  .entry-online-room-wrap,
  .entry-online-room,
  .room-list-item-wrap,
  .room-list-item {
    grid-template-columns: 1fr;
  }

  .entry-online-room b {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .room-list-action {
    justify-self: start;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .entry-mode-list {
    gap: 6px;
  }

  .entry-mode-list button {
    min-height: 50px;
    padding: 8px 10px;
  }

  .entry-room-status {
    gap: 7px;
    padding: 9px;
  }

  .entry-room-grid {
    gap: 6px;
  }

  .entry-room-fact {
    padding: 7px;
  }

  .entry-skin-detail {
    min-height: 0;
    gap: 6px;
    padding: 10px;
  }
}
