/* ✉ 信箱（js/mail.js，本機改動第 110 項）：沿用 .lmui-ov 暗金石紋外框（lmui.css 檔尾「3.5 視窗外框」）＋底部 .ft 按鈕列。
   清單一封一列（圖示｜來源標籤＋標題／附件小圖示＋剩幾天）；內容頁（標題、內文、附件清單）。
   手機直式 375 寬、電腦（pcui.css 把 .lmui-ov 變成左邊的小視窗）：照下面；手機橫式（max-height 500，窗很矮）：列、按鈕縮小 */

/* 紅點：⊞ 鈕右上角、選單上「信箱」那一項的右邊 */
.ml-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; border: 1px solid #2a0a06;
  background: radial-gradient(circle at 40% 35%, #ff7a5c, #d1281a 70%); color: #fff; font: 700 11px/16px Arial, Helvetica, sans-serif; text-align: center;
  box-shadow: 0 0 6px rgba(255,80,50,.7), 0 1px 2px #000; pointer-events: none; }
#lmui-fnmenu button .ml-badge { position: static; margin-left: auto; }

.ml-ov .bd { gap: 4px; }
.ml-none { padding: 48px 8px; text-align: center; color: #a8997a; font-size: 15px; }

/* 一封一列 */
.ml-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px; padding: 6px 8px; border: 1px solid #4a3f30; border-radius: 6px;
  background: linear-gradient(180deg, rgba(42,33,22,.95), rgba(22,17,11,.95)); color: #b9ad98; text-align: left; cursor: pointer; font-family: inherit; flex: none; }
.ml-row:active { filter: brightness(1.25); }
.ml-row.unread { border-color: #8a6a32; color: #fff3d6; box-shadow: inset 0 0 0 1px rgba(242,193,78,.18); }
.ml-row.done { opacity: .62; }
.ml-ic { position: relative; flex: none; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border: 1px solid #5a4630; border-radius: 6px;
  background: radial-gradient(circle at 50% 40%, #3a2e1e, #0b0806 80%); }
.ml-ic .ml-pic { width: 34px; height: 34px; object-fit: contain; }
.ml-env svg { width: 26px; height: 26px; fill: none; stroke: #e2bd6b; stroke-width: 1.6; stroke-linejoin: round; }
.ml-row.unread .ml-ic { border-color: #c9a24a; box-shadow: 0 0 6px rgba(242,193,78,.45); }
.ml-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ml-l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ml-l2 { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 20px; }
.ml-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; }
.ml-row:not(.unread) .ml-title { font-weight: 400; }
/* 來源標籤 */
.ml-tag { flex: none; padding: 0 5px; border-radius: 3px; font-size: 11px; line-height: 17px; font-weight: 700; color: #1a1208; background: #b9a57a; }
.ml-tag.s1 { background: #8fd18a; }   /* 新手任務 */
.ml-tag.s2 { background: #f2c14e; }   /* 試煉 */
.ml-tag.s3 { background: #7fc6ff; }   /* 簽到 */
.ml-tag.s4 { background: #c4a3ff; }   /* 離線掛機 */
.ml-tag.s5 { background: #ff9a7a; }   /* 系統補償 */
.ml-atts { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 3px; overflow: hidden; }
.ml-mini { flex: none; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 3px; background: rgba(0,0,0,.35); }
.ml-mini img { width: 18px; height: 18px; object-fit: contain; }
.ml-mini.got { opacity: .35; }
.ml-more { flex: none; font-size: 11px; color: #a8997a; }
.ml-left { flex: none; margin-left: auto; font-size: 12px; color: #a8997a; white-space: nowrap; }
.ml-left.warn { color: #ff6b57; font-weight: 700; }
/* 領完的勾 */
.ml-ok { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: #3f8f3a; border: 1px solid #0d2a0b; box-shadow: 0 1px 2px #000; }
.ml-ok::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* 內容頁 */
.ml-dhd { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 4px 4px 8px; border-bottom: 1px solid #4a3f30; color: #fff3d6; }
.ml-dhd .ml-title { white-space: normal; font-size: 16px; }
.ml-date { font-size: 12px; color: #a8997a; }
.ml-body { flex: none; padding: 8px 6px; color: #e8dcc0; font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.ml-atl { flex: none; display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.ml-att { position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px; border: 1px solid #4a3f30; border-radius: 6px; background: rgba(26,20,14,.92); }
.ml-att.got { opacity: .5; }
.ml-aic { position: relative; flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: rgba(0,0,0,.4); }
.ml-aic img { width: 32px; height: 32px; object-fit: contain; }
.ml-anm { flex: 1 1 auto; min-width: 0; color: #f1ead9; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.ml-anm.en { color: #fde68a; }
.ml-att .ml-ok { position: relative; right: auto; bottom: auto; flex: none; margin-left: auto; }

/* 結果那一句、底部按鈕 */
.ml-msg { flex: none; padding: 5px 10px 0; text-align: center; font-size: 14px; color: #9be59b; }
.ml-msg.bad { color: #ff8a73; }
.ml-msg[hidden] { display: none; }
.ml-ov .ft button.go { border-color: #b7791f; background: linear-gradient(#5a3f14, #2e1f08); color: #fde68a; }
.ml-ov .ft button:disabled { opacity: .45; cursor: default; }

/* 手機橫式：窗很矮 → 列、按鈕縮小 */
@media (max-height: 500px) {
  .ml-row { min-height: 44px; padding: 3px 6px; }
  .ml-ic { width: 34px; height: 34px; }
  .ml-ic .ml-pic { width: 28px; height: 28px; }
  .ml-l2 { min-height: 16px; }
  .ml-title { font-size: 14px; }
  .ml-ov .ft { padding: 4px 8px; }
  .ml-ov .ft button { padding: 5px 8px; font-size: 14px; }
  .ml-att { min-height: 36px; }
  .ml-aic { width: 30px; height: 30px; }
  .ml-aic img { width: 26px; height: 26px; }
  .ml-body { padding: 4px 6px; font-size: 14px; }
  .ml-none { padding: 20px 8px; }
}
