/* 信 The inbox on the Profile, and its mark on the face in the top bar
   (owner, 2026-10-11 and -12). inbox.js draws it, inboxui.js listens.

   A sheet of its own rather than a block in learn.css: it is loaded with the
   other two on every page (pages/index.html), and the build checks it with
   them (tools/build-web.mjs). */

/* ── The mark ──────────────────────────────────────────────────────────────
   *"the yellow mark at the profil sign still always will appear when the
   inbox has an unread message, maybe even bigger when we send a message so it
   can be separated from normal messages."* Gold, the coin's, because the face
   it sits on is the seal's red; a dot for anything unread, a disc with the
   count when one of the owners wrote. */
.mail-mark {
  display: inline-block; width: 10px; height: 10px; border-radius: 99px;
  background: #E0B94A; box-shadow: 0 0 0 2px var(--bg);
  vertical-align: middle; flex: 0 0 auto;
}
.mail-mark.big {
  width: auto; min-width: 18px; height: 18px; padding: 0 5px;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  color: #1F1A0C; font-variant-numeric: tabular-nums;
}
/* On the face: over its top right corner. */
.acct { position: relative; }
#acct-mail { position: absolute; left: 22px; top: -3px; line-height: 0; }
#acct-mail[hidden] { display: none; }

/* ── The panel ───────────────────────────────────────────────────────────── */
.pf-inbox { border: 1px solid var(--hair); border-radius: var(--r-chip); padding: 12px 14px; }
.pf-inbox > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
}
.pf-inbox > summary::-webkit-details-marker { display: none; }
.pf-inbox > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.pf-inbox[open] > summary::after { content: '▴'; }
.inbox-ico { color: var(--fg-2); }
.inbox-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

.inbox-card {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--hair); border-radius: var(--r-chip); padding: 12px;
}
.inbox-card.new { border-color: var(--seal); }
.inbox-card p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.inbox-quote {
  display: flex; flex-direction: column; gap: 6px;
  margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--raised);
}
/* The small capitals that head a card or a part of it: "Your feedback" with
   its day, "Reply to your feedback", "A message from Gushi", "New in Gushi". */
.inbox-label {
  display: flex; justify-content: space-between; gap: 8px;
  color: var(--muted); font-size: var(--fs-fine); text-transform: uppercase; letter-spacing: .06em;
}
.inbox-label.seal { color: var(--seal-text); }
.inbox-label span + span { text-transform: none; letter-spacing: 0; color: var(--muted); }
.inbox-said small { display: block; color: var(--muted); font-size: var(--fs-fine); }
/* The receipt, inside the box that holds what was sent. */
.inbox-thanks { display: flex; gap: 6px; align-items: baseline; color: var(--fg-2); font-size: var(--fs-fine); }
.inbox-thanks > span:first-child { color: var(--jade); font-weight: 700; }
/* What was said about the feedback hangs from a rail under it. */
.inbox-rail {
  display: flex; flex-direction: column; gap: 8px;
  border-left: 2px solid color-mix(in srgb, var(--seal) 55%, transparent); padding-left: 10px;
}
.inbox-news { font-size: var(--fs-small); }
.inbox-said { padding: 8px 10px; border-radius: 8px; }
.inbox-said.theirs { background: color-mix(in srgb, var(--seal) 12%, transparent); }
.inbox-said.mine { background: var(--raised); margin-left: 24px; }
.inbox-new {
  display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 99px;
  background: var(--seal); color: var(--seal-on); font-size: 10px; font-weight: 600;
}
.inbox-reply { display: flex; gap: 8px; align-items: flex-end; }
.inbox-reply textarea {
  flex: 1; min-height: 44px; resize: vertical; font: inherit; color: var(--fg);
  background: var(--bg-sunken); border: 1px solid var(--hair); border-radius: 8px; padding: 8px 10px;
}
.inbox-reply textarea:focus { outline: 2px solid var(--seal); outline-offset: -1px; }
.inbox-empty { display: flex; flex-direction: column; gap: 4px; }
/* Clearing a card away (#2601): one quiet word at the card's foot, the seal
   only under the pointer. It asks before it does anything. */
.inbox-foot { display: flex; justify-content: flex-end; }
.inbox-del {
  font: inherit; font-size: var(--fs-fine); color: var(--muted);
  background: none; border: 0; padding: 2px 4px; border-radius: 6px; cursor: pointer;
}
.inbox-del:hover, .inbox-del:focus-visible { color: var(--seal-text); }
.inbox-del:focus-visible { outline: 2px solid var(--seal); outline-offset: 1px; }
.inbox-del:disabled { opacity: .5; cursor: default; }
