body.launcher-active #GameCanvas,
body.launcher-active #splash {
  visibility: hidden;
}

#account-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  overflow: auto;
  color: #263b4a;
  background-color: #edf5f5;
  background-image: linear-gradient(145deg, rgba(245, 249, 247, 0.95), rgba(210, 231, 234, 0.98));
  font-family: "Microsoft YaHei", Arial, sans-serif;
  text-align: left;
  user-select: text;
}

body.launcher-active #account-gate {
  display: block;
}

#account-gate::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.launcher-shell {
  position: relative;
  width: min(960px, calc(100% - 32px));
  min-height: 100%;
  margin: 0 auto;
  padding: 42px 0;
  box-sizing: border-box;
}

.launcher-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(56, 106, 112, 0.22);
}

.launcher-brand {
  margin: 0;
  color: #1f5963;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.launcher-panel {
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(48, 102, 108, 0.25);
  border-radius: 8px;
  background: rgba(252, 254, 252, 0.9);
  box-shadow: 0 18px 48px rgba(41, 78, 86, 0.14);
  box-sizing: border-box;
}

.launcher-panel-wide {
  width: 100%;
}

.launcher-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 6px;
  background: #e7f0ef;
}

.launcher-tab,
.launcher-button,
.server-item,
.launcher-link {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.launcher-tab {
  min-height: 38px;
  border-radius: 4px;
  color: #648087;
  background: transparent;
}

.launcher-tab.is-active {
  color: #fffdf7;
  background: #34737b;
}

.launcher-field {
  display: block;
  margin-bottom: 16px;
}

.launcher-field span {
  display: block;
  margin-bottom: 7px;
  color: #58717a;
  font-size: 13px;
}

.launcher-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #b5cacc;
  border-radius: 5px;
  outline: none;
  color: #263b4a;
  background: #fbfdfb;
  box-sizing: border-box;
  font-size: 15px;
}

.launcher-input:focus {
  border-color: #34737b;
  box-shadow: 0 0 0 3px rgba(52, 115, 123, 0.12);
}

.launcher-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 5px;
  color: #fffdf7;
  background: #c75b4b;
  font-weight: 700;
}

.launcher-button:hover {
  background: #b74c3e;
}

.launcher-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.launcher-button-block {
  width: 100%;
}

.launcher-link {
  padding: 6px 0;
  color: #34737b;
  background: transparent;
}

.launcher-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: #b64f43;
  font-size: 13px;
}

.account-line {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #5a747c;
}

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

.server-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid #bdd1d2;
  border-radius: 6px;
  color: #263b4a;
  background: rgba(250, 253, 251, 0.88);
  text-align: left;
}

.server-item:hover,
.server-item.is-selected {
  border-color: #34737b;
  background: #edf7f4;
  box-shadow: 0 8px 20px rgba(52, 115, 123, 0.12);
}

.server-state {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5bb876;
}

.server-state.is-closed {
  background: #8b8170;
}

.server-name,
.role-name {
  display: block;
  overflow-wrap: anywhere;
}

.server-name {
  color: #245e68;
  font-size: 16px;
  font-weight: 700;
}

.role-name {
  margin-top: 5px;
  color: #718991;
  font-size: 13px;
}

.server-tag {
  color: #c75b4b;
  font-size: 12px;
}

.launcher-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(56, 106, 112, 0.18);
}

.launcher-action .launcher-field {
  margin: 0;
}

.launcher-empty {
  padding: 28px 0;
  color: #6f878e;
  text-align: center;
}

.name-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.name-input-row .launcher-input {
  min-width: 0;
}

.dice-button {
  flex: 0 0 44px;
  width: 44px;
  border: 1px solid #c75b4b;
  border-radius: 5px;
  color: #c75b4b;
  background: #fff5ef;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.dice-button:hover {
  color: #fffdf7;
  background: #c75b4b;
}

@media (max-width: 700px) {
  .launcher-shell {
    width: calc(100% - 24px);
    margin-left: auto;
    margin-right: auto;
    padding: 18px 0;
  }

  .launcher-header {
    align-items: flex-start;
  }

  .launcher-brand {
    font-size: 28px;
  }

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

  .launcher-action {
    grid-template-columns: 1fr;
  }

  .launcher-action .launcher-button {
    width: 100%;
  }

  .launcher-panel {
    padding: 22px;
  }
}
