#view-inbox,
.inbox-shell,
.inbox-list,
#folder-items,
.inbox-folder,
.inbox-item,
.folder-header {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

#view-inbox,
.inbox-shell,
.inbox-list,
#folder-items {
  overflow-x: hidden;
  overflow-x: clip;
}

.inbox-shell {
  max-width: 720px;
  margin: 0 auto;
}

.inbox-page-title {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.inbox-folder,
.inbox-item {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.inbox-folder {
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
}

.inbox-item {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.inbox-folder + .inbox-folder,
.inbox-item + .inbox-item {
  border-top: none;
}

.folder-icon-wrap,
.inbox-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.folder-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.inbox-icon {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

.folder-info,
.inbox-content {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.folder-name,
.folder-desc,
.header-title,
.inbox-title,
.inbox-msg,
.inbox-post-title,
.inbox-time {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-name,
.header-title,
.inbox-title,
.inbox-msg {
  color: var(--text);
  font-weight: 700;
}

.folder-desc,
.inbox-post-title,
.inbox-time {
  color: var(--muted);
}

.inbox-post-title,
.inbox-time {
  margin-top: 4px;
}

.folder-arrow,
.folder-badge,
.inbox-dot {
  justify-self: end;
  flex-shrink: 0;
}

.folder-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.folder-arrow {
  color: var(--muted);
  font-size: 20px;
}

.inbox-dot {
  width: 8px;
  height: 8px;
  margin-left: 10px;
  border-radius: 50%;
  background: #ef4444;
}

.folder-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.back-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.header-title {
  text-align: center;
}

.folder-header > :last-child {
  justify-self: end;
  width: 40px;
}

@media (max-width: 720px) {
  #view-inbox,
  .inbox-shell,
  .inbox-list,
  #folder-items {
    width: 100%;
    max-width: 100vw;
    margin: 0;
  }

  .inbox-folder,
  .inbox-item,
  .folder-header {
    width: 100%;
    max-width: 100vw;
    padding-left: 14px;
    padding-right: 14px;
  }
}
