#header .social-tools {
  grid-column: 4;
  grid-row: 1;
  display: flex;
  gap: 6px;
  align-items: center;
}
#header {
  grid-template-columns: 190px minmax(0, 1fr) auto auto auto;
}
.social-tools #settingsButton {
  flex-shrink: 0;
}
.notification-bell {
  position: relative;
  width: 40px;
  height: 44px;
  padding: 8px;
  display: grid;
  place-items: center;
}
.notification-count {
  position: absolute;
  right: -4px;
  top: -6px;
  border-radius: 12px;
  background: #c6ed65;
  color: #07160f;
  font-size: 10px;
  padding: 2px 5px;
}
.header-party {
  display: flex;
  gap: 3px;
  max-width: 240px;
  overflow-x: auto;
}
.party-pilot {
  padding: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 34px;
  border-bottom: 2px solid #52655c;
}
.party-pilot.ready {
  border-bottom-color: #c6ed65;
}
.party-pilot-name {
  white-space: nowrap;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9px;
}
.social-avatar,
.pilot-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1c392b;
  color: #c6ed65;
  overflow: hidden;
  flex-shrink: 0;
}
.social-avatar img,
.pilot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.notification-panel {
  position: fixed;
  z-index: 150;
  top: 76px;
  right: 12px;
  width: min(390px, calc(100vw - 24px));
  max-height: 75dvh;
  overflow: auto;
  padding: 16px;
  border: 1px solid #527844;
  border-radius: 8px;
  background: #071712;
  box-shadow: 0 12px 45px #000b;
}
.notification-panel h2 {
  font-size: 20px;
}
.notification-panel > button {
  margin: 4px;
  font-size: 12px;
}
.notification-item {
  display: flex;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 6px;
  background: transparent;
  border-bottom: 1px solid #244336;
  white-space: normal;
}
.notification-item.unread {
  background: #24432b;
  border-left: 3px solid #c6ed65;
}
.notification-item small {
  display: block;
  font-size: 12px;
  color: #b7c8bc;
  overflow-wrap: anywhere;
}
.social-toasts {
  position: fixed;
  z-index: 160;
  top: max(80px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, calc(100vw - 24px));
  pointer-events: none;
}
.social-toast {
  display: flex;
  margin-bottom: 8px;
  border: 1px solid #a8d45d;
  border-radius: 8px;
  background: #10271ff5;
  box-shadow: 0 6px 25px #0008;
  pointer-events: auto;
}
.social-toast button {
  border: 0;
  background: transparent;
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
  font-size: 13px;
  padding: 12px;
}
.social-toast button:first-child {
  flex: 1;
}
.avatar-editor {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 18px 0;
}
.avatar-editor .social-avatar {
  width: 64px;
  height: 64px;
}
.avatar-editor > button {
  grid-column: 2;
  justify-self: start;
}
.avatar-editor label {
  min-width: 0;
}
.avatar-editor small {
  grid-column: 1/-1;
  color: #b7c8bc;
}
.avatar-editor input {
  max-width: 100%;
}
.robot-style-controls {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}
@media (max-width: 1150px) {
  #header {
    grid-template-columns: 1fr auto auto auto;
  }
  #header .social-tools {
    grid-column: 3;
  }
  .header-party {
    max-width: 175px;
  }
}
@media (max-width: 760px) {
  #header {
    grid-template-columns: 1fr auto auto;
  }
  #header .social-tools {
    grid-column: 3;
  }
  .header-party {
    max-width: 110px;
  }
  .party-pilot-name {
    display: none;
  }
  .party-pilot {
    min-width: 26px;
  }
  .party-pilot .social-avatar {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  .notification-bell {
    width: 32px;
  }
  #header .social-tools {
    gap: 3px;
  }
  .notification-panel {
    top: 70px;
  }
}

#garage .parts-shelf {
  grid-template-columns: minmax(0, 1fr);
}
#garage .parts-shelf > * {
  grid-column: 1;
}
#garage #appearance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 12px;
  align-items: start;
  overflow: auto;
  padding: 8px 0;
}
#garage #appearance .robot-style-controls {
  display: contents;
}
#appearance .style-field input,
#appearance .style-field select {
  width: 100%;
  min-width: 0;
  height: 40px;
}
.style-field {
  min-width: 0;
}
.style-field label {
  display: block;
  margin: 0 0 6px;
  font-size: 10px;
}
#robotDialog .robot-style-controls {
  grid-template-columns: 1fr 1fr;
}
.pilot-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 2px solid #a3cdca;
}
.pilot-bio {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 48ch;
  line-height: 1.45;
  color: #cbdadf;
}
.lobby-player > div {
  min-width: 0;
}
.roster-player {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 12px;
}
.roster-player .pilot-avatar {
  grid-column: 1;
  grid-row: 1 / 4;
}
.roster-player > strong {
  grid-column: 2;
  grid-row: 1;
  overflow-wrap: anywhere;
}
.roster-player > p {
  grid-column: 2;
  grid-row: 2;
}
.roster-player .pilot-bio {
  grid-column: 2;
  grid-row: 3;
}
#profilePrivacy {
  display: block;
  line-height: 1.5;
  margin: 8px 0 16px;
}
#profileBio {
  width: 100%;
  resize: vertical;
  min-height: 80px;
  padding: 12px;
  border: 1px solid #567568;
  background: #091814;
  color: #ecf4ee;
  font: inherit;
  line-height: 1.5;
}
@media (max-width: 600px) {
  #profileForm input,
  #profileForm select,
  #profileForm textarea {
    font-size: 16px;
  }
  .lobby-player {
    gap: 10px;
  }
  .lobby-player .status {
    font-size: 10px;
  }
}
