.shell:has(.inbox-page:not([hidden])) #profile-header { display: none; }
.shell:has(.inbox-page:not([hidden])) > .page { grid-row: 2; }
#profile-inbox-count {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  min-width: 14px;
  min-height: 14px;
  padding-inline: 2px;
  border: 1px solid var(--color-page);
  border-radius: 12px;
  background: #b8423b;
  color: #fff;
  font-size: 9px;
  line-height: 1;
  pointer-events: none;
}

.inbox-page { display: flex; flex-direction: column; }

.inbox-header-action {
  position: absolute;
  inset: 0 4px 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  color: #f1dbbf;
}

.inbox-header-action svg { width: 22px; height: 22px; }
.inbox-header-action:disabled { opacity: .5; cursor: default; }

.inbox-content {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 20px;
  padding: 20px 12px 16px;
}

.inbox-tabs button { display: flex; align-items: center; justify-content: center; gap: 1px; }

.inbox-tabs [data-inbox-count] {
  display: grid;
  place-items: center;
  min-width: 12px;
  height: 12px;
  padding-inline: 2px;
  border-radius: 20px;
  background: #f2ddc1;
  color: #1b160d;
  font-size: 9px;
  line-height: 1;
}

.inbox-tabs button[aria-pressed='true'] [data-inbox-count] { background: #c5ab73; }
.inbox-list { display: grid; gap: 8px; }

.inbox-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(#231f18, #1c1813);
  color: var(--color-hi);
  cursor: pointer;
  text-align: start;
}

.inbox-row:hover { background: #29231b; }
.inbox-row-body { display: grid; min-width: 0; gap: 2px; padding-inline-end: 10px; }
.inbox-row strong { overflow-wrap: anywhere; font-size: 14px; line-height: 18px; font-weight: 500; }
.inbox-row time { color: #b09673; font-size: 12px; line-height: 16px; }
.inbox-row-body > span { overflow-wrap: anywhere; font-size: 11px; line-height: 15px; }
.inbox-row.is-unread::after { content: ''; position: absolute; top: 18px; right: 16px; width: 6px; height: 6px; border-radius: 50%; background: #bd4239; }
.inbox-filter { display: flex; align-items: center; justify-content: space-between; color: #d0b482; font-size: 13px; }
.inbox-filter select { min-height: 32px; padding: 4px 8px; border: 1px solid #4c4136; border-radius: 8px; background: #28221a; color: var(--color-hi); }
.inbox-status { color: #dec5a4; font-size: 13px; overflow-wrap: anywhere; }
#inbox-detail-status { margin: 14px 12px 0; }

.inbox-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #3c3935;
  border-radius: 12px;
  background: #201d19;
  color: #d0b482;
  font-size: 14px;
}

.inbox-button-primary { border-color: #927776; background: linear-gradient(145deg, #6f5955, #332a24); color: #fff; }
.inbox-button:disabled { opacity: .65; cursor: default; }
.inbox-button:not(:disabled):hover { filter: brightness(1.12); }

.inbox-detail-content { padding: 20px 12px; }
.inbox-detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inbox-detail-heading h2 { min-width: 0; color: var(--color-hi); font-size: 18px; line-height: 24px; font-weight: 500; }
.inbox-detail-heading span { flex: none; padding: 2px 8px; border-radius: 18px; background: #2c2926; color: #cfb37b; font-size: 12px; }
.inbox-detail-content time { display: block; margin-top: 2px; color: #a28b70; font-size: 12px; }
.inbox-detail-content p { margin-top: 10px; color: var(--color-hi); font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
#inbox-mark-read { margin-top: 20px; }
.inbox-empty { display: grid; justify-items: center; gap: 12px; padding: 28px 8px; color: #b49d83; }
.inbox-empty img { width: 104px; height: auto; }
