.friend-login-button {
  width: 100%;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #d8d3c3;
  border-radius: 4px;
  background: #f7f5ed;
  color: #53695a;
  cursor: pointer;
  font: 600 9px 'DM Sans', sans-serif;
}

.friend-login-button:hover { background: #efeee4; }
.friend-retry-button { justify-self: start; min-height: 27px; padding: 5px 9px; border: 1px solid #d8d3c3; border-radius: 4px; background: #f7f5ed; color: #53695a; cursor: pointer; font: 600 8px 'DM Sans', sans-serif; }
.friend-status,
.dashboard-friend-status { min-height: 0; margin: 5px 0; color: #687c6c; font-size: 9px; line-height: 1.45; }
.friend-status:empty,
.dashboard-friend-status:empty { display: none; }
.friends-field-hint { margin: -5px 0 8px; color: #89938a; font-size: 8px; line-height: 1.5; }
.dashboard-friend-help { margin: -2px 0 4px; color: #89938a; font-size: 7px; line-height: 1.35; }
.friend-status.error,
.dashboard-friend-status.error { color: #a45a4e; }
.friend-inbox { display: grid; gap: 6px; margin: 8px 0; }
.friend-inbox:empty { display: none; }
.friend-inbox-item {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #e8e4d9;
  border-radius: 4px;
  background: #fffefa;
}
.friend-inbox-copy { display: grid; min-width: 0; gap: 3px; }
.friend-inbox-copy strong { overflow: hidden; color: #405549; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.friend-inbox-copy small { color: #8a9389; font-size: 8px; line-height: 1.4; }
.friend-inbox-actions { display: flex; gap: 4px; }
.friend-inbox-actions button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #dcd7c8;
  border-radius: 4px;
  background: #faf9f4;
  color: #53695a;
  cursor: pointer;
  font: 600 8px 'DM Sans', sans-serif;
  white-space: nowrap;
}
.friend-inbox-actions .friend-accept-button { border-color: #244b3e; background: #244b3e; color: #fff; }
.friend-inbox-actions .friend-block-button { border-color: #ead8d3; background: #fcf7f5; color: #97594f; }
.friend-row { grid-template-columns: minmax(70px, 1fr) auto auto; }
.friend-identity { display: grid; min-width: 0; gap: 4px; }
.friend-identity strong { overflow: hidden; color: #405549; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.friend-presence { display: flex; align-items: center; gap: 5px; color: #969c92; font-size: 7px; }
.friend-presence::before { width: 6px; height: 6px; border-radius: 50%; background: #b6b9af; content: ''; }
.friend-presence.online { color: #4e805b; }
.friend-presence.online::before { background: #70a77b; box-shadow: 0 0 0 2px #70a77b20; }
.friend-row .friend-invite-button { border-color: #d5caa9; background: #f8f6ee; padding: 7px 9px; color: #6c603f; font: 600 8px 'DM Sans', sans-serif; }
.friend-row .friend-remove-button { border: 0; background: transparent; padding: 6px 3px; color: #929a90; font: 500 8px 'DM Sans', sans-serif; }
.friend-row .friend-remove-button:hover { color: #a45a4e; }
.blocked-users-panel { margin-top: 12px; padding-top: 9px; border-top: 1px solid #e8e4d9; }
.blocked-users-panel h3 { margin: 0 0 6px; color: #758176; font-size: 8px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.blocked-user-list { display: grid; gap: 5px; }
.blocked-user-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 1px solid #eee8e3; border-radius: 4px; background: #fbf8f6; }
.blocked-user-row strong { overflow: hidden; color: #5d625a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.blocked-user-row button { flex: 0 0 auto; border: 0; background: transparent; padding: 5px 7px; color: #7a6b58; font: 600 8px 'DM Sans', sans-serif; cursor: pointer; }
.blocked-user-row button:hover { color: #40594a; text-decoration: underline; }
.dashboard-inbox { display: grid; gap: 3px; }
.dashboard-inbox .friend-inbox-item { gap: 4px; padding: 5px 6px; }
.dashboard-inbox .friend-inbox-copy { gap: 2px; }
.dashboard-inbox .friend-inbox-copy strong { font-size: 8px; }
.dashboard-inbox .friend-inbox-copy small { font-size: 7px; }
.dashboard-inbox .friend-inbox-actions { gap: 3px; }
.dashboard-inbox .friend-inbox-actions button { min-height: 23px; padding: 0 6px; font-size: 7px; }
.dashboard-friend-list .friend-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px; padding: 4px 0; border: 0; border-bottom: 1px solid #f0eee8; border-radius: 0; background: transparent; }
.dashboard-friend-list .friend-identity { gap: 2px; }
.dashboard-friend-list .friend-identity strong { font-size: 8px; }
.dashboard-friend-list .friend-presence { font-size: 6px; }
.dashboard-friend-list .friend-invite-button { padding: 4px 5px; font-size: 7px; }
.dashboard-friend-list .friend-remove-button { display: none; }
.welcome-friends-card:focus-within .dashboard-friend-list .friend-remove-button { display: block; }
.dashboard-inbox .lobby-empty,
.dashboard-friend-list .lobby-empty { margin: 2px 0; padding: 4px 0; border: 0; background: transparent; font-size: 7px; line-height: 1.4; }
.friend-inbox button:disabled,
.friend-row button:disabled { cursor: wait; opacity: .55; }

.online-modal :is(.friend-login-button, .friend-inbox button, .friend-row button, .friend-retry-button, .blocked-user-row button, #friend-name):focus-visible,
.welcome-dashboard :is(.friend-login-button, .friend-inbox button, .friend-row button, .friend-retry-button, .blocked-user-row button, #welcome-friend-name):focus-visible {
  outline: 2px solid #9c8144;
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .welcome-friends-card { min-width: 0; }
  .welcome-friends-card .friend-login-button { margin: 4px 0; padding: 5px; font-size: 7px; }
  .dashboard-friend-status { margin: 2px 0; font-size: 7px; }
  .dashboard-friend-help { font-size: 6px; }
  .dashboard-inbox { max-height: 43px; overflow: hidden; }
  .dashboard-inbox .friend-inbox-item { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 4px; }
  .dashboard-inbox .friend-inbox-copy strong { font-size: 7px; }
  .dashboard-inbox .friend-inbox-copy small { display: none; }
  .dashboard-inbox .friend-inbox-actions button { min-height: 20px; }
  .dashboard-friend-list { max-height: 31px; }
  .dashboard-friend-list .friend-row { padding: 2px 0; }
  .dashboard-friend-list .friend-identity strong { font-size: 7px; }
  .dashboard-friend-list .friend-presence { font-size: 6px; }
  .dashboard-friend-list .friend-invite-button { padding: 3px; font-size: 6px; }
  .friend-row { grid-template-columns: minmax(0, 1fr) auto; }
  .friend-row .friend-remove-button { grid-column: 2; justify-self: end; }
  .friend-inbox-item { grid-template-columns: minmax(0, 1fr); }
}
