/* Shared chrome for the signed-in pages (friends, avatar). Same palette as the
   catalog: Roblox blue bar, light grey page, Source Sans Pro. */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Source Sans Pro', Arial, sans-serif;
  background: #e8e8e8;
  color: #393939;
  font-size: 14px;
  min-height: 100vh;
}

.topbar {
  height: 44px;
  background: #0078c8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar img { height: 32px; display: block; }

.topbar-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar a.back {
  margin-left: auto;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  white-space: nowrap;
}

.topbar a.back:hover { background: rgba(255, 255, 255, 0.3); }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sub {
  color: #767676;
  font-size: 13px;
  margin-bottom: 16px;
}

.panel {
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  padding: 18px;
}

.banner {
  padding: 10px 12px;
  border-radius: 4px;
  background: #fdecea;
  border: 1px solid #f5c6c1;
  color: #a02a24;
  font-size: 13px;
  margin-bottom: 14px;
}

.banner[hidden] { display: none; }

.spinner {
  color: #767676;
  font-size: 13px;
  padding: 24px 0;
  text-align: center;
}

/* ── Add a friend ── */
.add-form {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  max-width: 420px;
}

.add-form[hidden] { display: none; }

.add-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  outline: none;
}

.add-form input:focus { border-color: #0078c8; }

.add-form button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid #0078c8;
  border-radius: 3px;
  background: #0078c8;
  color: #fff;
  cursor: pointer;
}

.add-form button:hover { background: #0069b3; }
.add-form button:disabled { opacity: 0.6; cursor: default; }

.ghost {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #f5f5f5;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
}

.ghost:hover { background: #eaeaea; }
.ghost:disabled { opacity: 0.6; cursor: default; }

.requests-block { margin-bottom: 18px; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b6b6b;
  margin: 0 0 8px;
}

.person .join:disabled { opacity: 0.6; cursor: default; }

/* ── People ── */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  padding: 10px;
}

.person .pic {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.person .badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #0078c8;
  color: #fff;
  display: grid;
  place-items: center;
}

.person .badge.game { background: #00b06f; }
.person .badge svg { width: 10px; height: 10px; display: block; }

.person img,
.person .fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #dbe7f1;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #00619f;
}

.person .who { min-width: 0; flex: 1; }

.person .name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person .meta {
  font-size: 12px;
  color: #767676;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person .meta.online { color: #1e8e3e; font-weight: 600; }

.person .join {
  border: 1px solid #0078c8;
  background: #0078c8;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.person .join:hover { background: #0069b3; border-color: #0069b3; }

/* ── Avatar editor ── */
.avatar-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 780px) {
  .avatar-layout { grid-template-columns: 1fr; }
}

.avatar-card {
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  padding: 12px;
  text-align: center;
}

.avatar-card img {
  width: 100%;
  max-width: 276px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #eef4f9;
  border-radius: 4px;
}

.avatar-card .who { margin-top: 10px; font-weight: 700; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b6b6b;
  margin: 0 0 8px;
}

.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.item {
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  padding: 8px;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f3f6f9;
  border-radius: 3px;
}

.item .label {
  font-size: 12px;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}

.item button {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid #ccc;
  background: #f5f5f5;
  color: #444;
  cursor: pointer;
}

.item button:hover { background: #eaeaea; }
.item button.primary { background: #0078c8; border-color: #0078c8; color: #fff; }
.item button.primary:hover { background: #0069b3; }

.searchbar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.searchbar input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  outline: none;
}

.searchbar input:focus { border-color: #0078c8; }

.searchbar button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 3px;
  border: 1px solid #0078c8;
  background: #0078c8;
  color: #fff;
  cursor: pointer;
}

.searchbar button:hover { background: #0069b3; }

.stack { display: grid; gap: 18px; }

/* Sign-in panel inherits the catalog's look. */
.signin-host {
  --bsi-accent: #0078c8;
  --bsi-accent-hover: #0069b3;
  --bsi-radius: 3px;
}
