#recentMail {
  --paper: #fafbf7;
  --rule: #d2dbd3;
  --secondary: #50655b;
  --highlight: #edf4ef;
  --stamps: #dce9e8;
  --stamp-ink: #355d5d;
  margin-top: clamp(24px, 4vw, 42px);
}
.campus-dark #recentMail {
  --paper: #192a24;
  --rule: #384c42;
  --secondary: #b8cabe;
  --highlight: #20362d;
  --stamps: #314a48;
  --stamp-ink: #c3e1dc;
}
.inbox-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.inbox-head h2 { font: 500 clamp(25px, 3vw, 34px)/1.2 Georgia, "Songti SC", SimSun, serif; letter-spacing: -.035em; }
#inboxLabel, .inbox-sender, .inbox-time { color: var(--secondary); font-size: 13px; }
#inboxRows, #inboxStatus { margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 16px; background: var(--paper); }
#inboxStatus { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 22px; line-height: 1.6; }
.inbox-open {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 24px; background: var(--stamps); color: var(--stamp-ink); text-decoration: none; font-weight: 600;
}
.inbox-open::after { content: "↗" / ""; }
.inbox-open:hover { text-decoration: underline; }
.inbox-open:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#inboxRows { list-style: none; overflow: hidden; }
#inboxRows > li + li { border-top: 1px solid var(--rule); }
.inbox-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 28px; align-items: center;
  gap: 0 18px; min-height: 82px; padding: 14px 22px; color: inherit; text-decoration: none;
}
summary.inbox-row { list-style: none; cursor: pointer; }
summary.inbox-row::-webkit-details-marker { display: none; }
.inbox-row:is(a, summary):is(:hover, :focus-visible), #inboxRows details[open] { background: var(--highlight); }
.inbox-row:focus-visible { outline: 2px solid var(--stamp-ink); outline-offset: -3px; }
.inbox-stamp {
  position: relative; display: grid; place-items: center; width: 42px; height: 46px; border-radius: 3px;
  color: var(--stamp-ink); background: var(--stamps); font: 600 13px/1 Georgia, "Songti SC", serif; letter-spacing: .025em;
}
.inbox-stamp::after { content: ""; position: absolute; inset: 4px; border: 1px dashed currentColor; opacity: .48; }
#inboxRows li:nth-child(3n + 2) .inbox-stamp { color: #755340; background: #f1e4d7; }
#inboxRows li:nth-child(3n) .inbox-stamp { color: #4c5950; background: #e4e9dc; }
.campus-dark #inboxRows li:nth-child(3n + 2) .inbox-stamp { color: #ebd1b7; background: #4a3d34; }
.campus-dark #inboxRows li:nth-child(3n) .inbox-stamp { color: #d5dfbe; background: #3b4738; }
.inbox-copy { min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.inbox-subject { font-size: clamp(16px, 1.7vw, 19px); font-weight: 550; line-height: 1.35; }
.inbox-time { font-variant-numeric: tabular-nums; grid-column: 3; }
.inbox-arrow { grid-column: 4; justify-self: end; font: 20px/1 sans-serif; color: var(--secondary); }
details[open] .inbox-arrow { transform: rotate(180deg); }
a.inbox-row:hover .inbox-arrow { transform: translate(2px, -2px); }
.inbox-note { padding: 0 68px 19px 86px; max-width: 78ch; line-height: 1.65; }
@media (prefers-reduced-motion: no-preference) {
  #inboxRows > li { animation: inbox-arrive .26s ease-out backwards; }
  #inboxRows > li:nth-child(2) { animation-delay: 45ms; }
  #inboxRows > li:nth-child(n + 3) { animation-delay: 90ms; }
  .inbox-arrow, .inbox-row { transition: transform .16s, background-color .16s; }
  @keyframes inbox-arrive { from { opacity: 0; transform: translateY(7px); } }
}
@media (max-width: 600px) {
  .inbox-row { grid-template: auto auto / 38px minmax(0, 1fr) 20px; gap: 4px 10px; padding: 14px; }
  .inbox-stamp { grid-column: 1; grid-row: 1 / 3; width: 35px; height: 40px; font-size: 11px; }
  .inbox-copy { grid-column: 2; grid-row: 1; }
  .inbox-time { grid-column: 2; grid-row: 2; font-size: 12px; }
  .inbox-arrow { grid-column: 3; grid-row: 1 / 3; }
  .inbox-note { padding: 0 18px 16px 62px; font-size: 14px; }
}
