/* ============================================================
   css/inbox.css — 我的消息（站内私信列表 · TASK-KSTAR-INBOX-001）
   设计系统：韩系法式唯美风；暖米纸底 / 干燥玫瑰 / 金色细线；无 emoji、纯 CSS 线条图标
   层叠：公告页(1800/1900) → 意见箱(1710) → 事件子页(1720) → 这里(1712)
   ★ 不许 position:fixed; inset:0 挂 body（桌面会撑满）——照 .bfb-overlay 的限宽做法：
     left:50% + max-width:480px + translateX(-50%)，挂 #app 内。
   类前缀 .ibx-（私信列表专属）
   ============================================================ */

.ibx-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 1712;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-bottom, 0px));
    opacity: 0;
    transition: opacity 0.22s ease;
    -webkit-tap-highlight-color: transparent;
}
.ibx-overlay.open { opacity: 1; }

/* ★ 2026-10 甲方口径「深色背景下公告界面里的字看不清」：私信这一层浮在公告页上面，
   和公告页一样必须**与主题无关**——在子树里就把这套纸底深字钉住（自定义属性向下继承），
   免得用户把背景换成深色时，这里跟着变成浅字压浅底 / 深字压深底。 */
.ibx-overlay {
    --bg-primary: #F8F4EF;
    --surface: rgba(255, 252, 249, 0.94);
    --surface-solid: #FFFFFF;
    --text-primary: #1E1C1A;
    --text-secondary: #8A8278;
    --text-muted: #BFB8AE;
    --border-faint: rgba(196, 168, 140, 0.16);
}
.ibx-panel {
    width: 100%;
    max-height: min(76vh, 620px);
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: var(--surface-solid, #FFFCF9);
    border: 1px solid var(--border-faint, rgba(196, 168, 140, 0.18));
    box-shadow: 0 18px 48px rgba(30, 28, 26, 0.22);
    transform: translateY(14px) scale(0.985);
    transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.ibx-overlay.open .ibx-panel { transform: translateY(0) scale(1); }

.ibx-head {
    display: flex;
    align-items: baseline;
    gap: 7px;
    flex-shrink: 0;
    padding: 14px 14px 12px 16px;
    border-bottom: 1px solid var(--border-faint, rgba(196, 168, 140, 0.14));
}
.ibx-t1 {
    font-size: 15px;
    letter-spacing: 1.6px;
    font-family: var(--font-body);
    color: var(--text-primary, #1E1C1A);
}
.ibx-t2 {
    font-family: var(--font-decorative, 'Playfair Display', Georgia, serif);
    font-style: italic;
    font-size: 10px;
    letter-spacing: 1.3px;
    color: var(--gold, #C4A86A);
}
.ibx-close {
    margin-left: auto;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary, #8A8278);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}
.ibx-close:hover { background: color-mix(in srgb, var(--accent, #C9A8A8) 10%, transparent); }
.ibx-close:active { transform: scale(0.9); }

/* ===== 列表 ===== */
.ibx-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 12px calc(12px + var(--safe-bottom, 0px));
}
.ibx-body::-webkit-scrollbar { display: none; }

.ibx-row {
    position: relative;
    padding: 11px 12px 12px 14px;
    margin-bottom: 8px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--rose, var(--accent, #C9A8A8)) 7%, var(--surface-solid, #FFFFFF));
    border: 1px solid color-mix(in srgb, var(--rose, var(--accent, #C9A8A8)) 22%, transparent);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}
.ibx-row:last-child { margin-bottom: 2px; }
.ibx-row:active { transform: scale(0.985); }
@media (hover: hover) {
    .ibx-row:hover {
        border-color: color-mix(in srgb, var(--rose, var(--accent, #C9A8A8)) 44%, transparent);
        box-shadow: 0 3px 14px color-mix(in srgb, var(--rose, var(--accent, #C9A8A8)) 18%, transparent);
    }
}
/* 未读：左侧细线（挑中一条就消失，不靠整块变灰变亮）
   ★ 2026-10 甲方定：未读标记一律跟主题色走（--rose），不再用固定未读红。 */
.ibx-row.is-new::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    bottom: 11px;
    width: 2px;
    border-radius: 2px;
    background: var(--rose, #C9A8A8);
}
.ibx-row-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}
.ibx-kind {
    font-size: 10.5px;
    letter-spacing: 1px;
    padding: 2px 7px;
    border-radius: 7px;
    color: var(--rose-dark, #A88080);
    background: var(--rose-faint, rgba(201, 168, 168, 0.13));
    white-space: nowrap;
}
.ibx-time {
    font-size: 10.5px;
    color: var(--text-muted, #BFB8AE);
    white-space: nowrap;
}
.ibx-title {
    font-size: 14px;
    line-height: 1.45;
    font-family: var(--font-body);
    color: var(--text-primary, #1E1C1A);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ibx-ex {
    margin-top: 5px;
    font-size: 12.5px;
    line-height: 1.6;
    font-family: var(--font-body);
    color: var(--text-secondary, #8A8278);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.ibx-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rose, #C9A8A8);
    box-shadow: 0 0 0 2px var(--surface-solid, #FFFCF9);
}
.ibx-row.is-new .ibx-title { padding-right: 14px; }

/* ===== 空态 / 加载 / 失败 ===== */
.ibx-empty,
.ibx-hint {
    padding: 30px 12px;
    text-align: center;
    font-size: 13px;
    line-height: 1.7;
    font-family: var(--font-body);
    color: var(--text-muted, #BFB8AE);
}
.ibx-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--text-muted, #BFB8AE);
    opacity: 0.6;
}
.ibx-retry { text-align: center; padding-bottom: 18px; }
.ibx-retry-btn {
    padding: 8px 18px;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--rose, var(--accent, #C9A8A8)) 40%, transparent);
    background: transparent;
    color: var(--rose-dark, #A88080);
    font-size: 12.5px;
    font-family: var(--font-body);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s ease;
}
.ibx-retry-btn:hover { background: var(--rose-faint, rgba(201, 168, 168, 0.14)); }

/* ===== 窄屏（<370px）===== */
@media (max-width: 370px) {
    .ibx-overlay { padding: 10px; padding-bottom: calc(10px + var(--safe-bottom, 0px)); }
    .ibx-panel { max-height: min(80vh, 600px); border-radius: 16px; }
    .ibx-title { font-size: 13.5px; }
    .ibx-ex { font-size: 12px; }
    .ibx-body { padding: 9px 10px calc(10px + var(--safe-bottom, 0px)); }
}

/* ===== 暗色主题 ===== */
[data-theme-mode="dark"] .ibx-panel {
    background: var(--surface-solid, #2A2420);
    border-color: color-mix(in srgb, var(--rose, var(--accent, #D4B8B8)) 20%, transparent);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}
[data-theme-mode="dark"] .ibx-row {
    background: color-mix(in srgb, var(--rose, var(--accent, #D4B8B8)) 11%, var(--surface-solid, #2A2420));
    border-color: color-mix(in srgb, var(--rose, var(--accent, #D4B8B8)) 22%, transparent);
}
[data-theme-mode="dark"] .ibx-dot { box-shadow: 0 0 0 2px var(--surface-solid, #2A2420); }

/* ============================================================
   ★ 块 E（TASK-INBOX-ASK-001）：「想跟您确认一句」那条私信下面的回答框
   壳沿用公告阅读页（.kp-page.kp-detail / .kp-scroll / .kp-read-*），这里只补回答框那一段。
   类前缀 .ask-（本文件独有，已确认全仓无重名）
   ============================================================ */
.ask-box {
    margin: 16px 2px 4px;
    padding: 12px 13px 10px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--rose, var(--accent, #D4B8B8)) 7%, var(--surface-solid, #FFFCF9));
    border: 1px solid var(--border-faint, rgba(196, 168, 140, 0.18));
}
.ask-input {
    width: 100%;
    box-sizing: border-box;
    border: none;
    outline: none;
    background: transparent;
    resize: none;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main, #3A3330);
    min-height: 58px;
    -webkit-tap-highlight-color: transparent;
}
.ask-input::placeholder { color: var(--text-faint, rgba(120, 108, 100, 0.5)); }
.ask-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--border-faint, rgba(196, 168, 140, 0.16));
}
.ask-err {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--rose, var(--accent, #C08A8A));
}
.ask-send {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    min-height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: var(--rose, var(--accent, #C9A8A8));
    color: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 0.04em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease, transform 0.16s ease;
}
.ask-send:active { transform: scale(0.97); }
.ask-send:disabled { opacity: 0.55; cursor: default; }
/* 已经答过 / 这句问得太久：只说一句，不埋怨她，也不留点了没用的按钮 */
.ask-done {
    margin: 16px 2px 4px;
    padding: 11px 13px;
    border-radius: 14px;
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.03em;
    color: var(--rose, var(--accent, #B98F8F));
    background: color-mix(in srgb, var(--rose, var(--accent, #D4B8B8)) 8%, transparent);
}
.ask-hint {
    margin: 16px 2px 4px;
    padding: 11px 13px;
    border-radius: 14px;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-faint, rgba(120, 108, 100, 0.75));
    background: color-mix(in srgb, var(--rose, var(--accent, #D4B8B8)) 5%, transparent);
}
@media (max-width: 370px) {
    .ask-box, .ask-done, .ask-hint { margin-left: 0; margin-right: 0; }
    .ask-input { font-size: 13.5px; }
}
[data-theme-mode="dark"] .ask-box {
    border-color: color-mix(in srgb, var(--rose, var(--accent, #D4B8B8)) 20%, transparent);
}
[data-theme-mode="dark"] .ask-input { color: var(--text-main, #EFE7E1); }
