/* v2.4 信箱（public/js/mail.js）與年度限定（public/js/yearly.js）；手機 375px 也排得下 */

.mail-row.unread { box-shadow: inset 0 0 0 2px var(--coral), 0 2px 0 var(--line); }
.mail-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: var(--ink); }

.mail-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mail-count { color: var(--ink-soft); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mail-textarea {
  width: 100%;
  min-height: 96px;
  padding: 10px 14px;
  background: #fffdf6 repeating-linear-gradient(transparent 0 27px, #f1e6cc 27px 28px);
  border: 2px solid var(--line);
  border-radius: 18px;
  font: inherit;
  font-size: 16px; /* 小於 16px 時 iOS 會自動放大畫面 */
  line-height: 28px;
  color: inherit;
  resize: vertical;
  user-select: text;
  -webkit-user-select: text;
}
.mail-textarea:focus { border-color: var(--mint); outline: 0; }
.mail-select {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  color: inherit;
}
.mail-attach-row .row-main { min-width: 0; }
input.num.mail-qty { flex: 0 0 72px; width: 72px; padding: 8px 10px; text-align: center; }
button.mail-postcard-pick { width: 100%; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.mail-postcard-pick.on { box-shadow: inset 0 0 0 2px var(--mint-dark), 0 2px 0 var(--line); background: #effaf5; }
.mail-send { background: #fff8df; }

/* 讀信：信紙 */
.mail-letter { padding: 14px 16px; background: #fffdf6 repeating-linear-gradient(transparent 0 27px, #f1e6cc 27px 28px); border-radius: 16px; box-shadow: inset 0 0 0 2px var(--line); }
.mail-letter.postcard { background: #fff; }
.mail-postcard { display: block; width: 100%; max-height: 180px; object-fit: contain; margin-bottom: 8px; border-radius: 10px; }
.mail-from { color: var(--ink-soft); font-size: 12.5px; }
.mail-text { margin: 6px 0; font-size: 16px; line-height: 28px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-attach { display: flex; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 13.5px; }

/* 年度限定 */
.yearly-banner { background: #ffe0d8; color: #9a4330; }
.yearly-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.yearly-item { display: flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; background: var(--paper-2); border-radius: 14px; font-size: 12.5px; max-width: 100%; }
.yearly-item .ic { width: 30px; height: 30px; flex: none; }
.yearly-item .tag { line-height: 18px; padding: 0 6px; }
.yearly-item.got { background: #e6f5e0; }
.yearly-item.missed { opacity: .55; }
.yearly-item.missed .ic { filter: grayscale(.9); }
.yearly-name { overflow-wrap: anywhere; }
.yearly-ph { display: inline-grid; place-items: center; border-radius: 12px; background: #fff; color: var(--ink-soft); font-weight: 700; box-shadow: inset 0 0 0 2px var(--line); }
