/* บัฟ/ดีบัฟบน HUD + modal อ่านรายละเอียด (แยกจากเมนูแต้มสถานะและสกิล) */

.hud-status-strip {
    /* ชิดขวาก่อน → เต็ม 3 ต่อแถว → ขึ้นแถวใหม่ สูงสุด 5 แถว */
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 2px;
    width: calc(3 * var(--touch-min, 44px) + 2 * 2px);
    max-height: calc(5 * var(--touch-min, 44px) + 4 * 2px);
    overflow: hidden;
    flex-shrink: 0;
    pointer-events: auto;
    align-self: flex-end;
}

.hud-status-strip:empty {
    display: none;
}

/* ไอคอนล้วน ไม่มีกรอบช่อง — ขนาดแตะได้ */
.hud-status-btn {
    position: relative;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    width: var(--touch-min, 44px);
    height: var(--touch-min, 44px);
    min-width: var(--touch-min, 44px);
    min-height: var(--touch-min, 44px);
    padding: 4px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    flex-shrink: 0;
}

.hud-status-btn-img {
    display: block;
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    pointer-events: none;
    user-select: none;
}

/* นับถอยหลัง — สไตล์เดียวกับ .skill-slot-cd */
.hud-status-cd {
    position: absolute;
    inset: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fffde7;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 1px 2px #000;
    pointer-events: none;
    border-radius: 2px;
    z-index: 2;
}

.hud-status-btn.on-cooldown .hud-status-btn-img {
    filter: saturate(0.55);
}

/* โบนัส EXP ปาร์ตี้ — เขียนทับกลางไอคอน */
.hud-status-party-bonus {
    position: absolute;
    inset: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fffde7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    -webkit-text-stroke: 2px #000;
    paint-order: stroke fill;
    text-shadow:
        0 0 3px #000,
        0 0 1px #000,
        0 2px 0 #000,
        0 -2px 0 #000,
        2px 0 0 #000,
        -2px 0 0 #000,
        1px 1px 0 #000,
        -1px 1px 0 #000,
        1px -1px 0 #000,
        -1px -1px 0 #000,
        2px 2px 0 #000,
        -2px 2px 0 #000,
        2px -2px 0 #000,
        -2px -2px 0 #000;
    pointer-events: none;
    z-index: 2;
    user-select: none;
}

.hud-status-btn--party .hud-status-btn-img {
    filter: drop-shadow(0 0 4px rgba(129, 199, 132, 0.55));
}

.hud-status-btn--sit .hud-status-btn-img {
    filter: drop-shadow(0 0 4px rgba(129, 199, 132, 0.55));
}

.hud-status-btn--overweight .hud-status-btn-img {
    filter: drop-shadow(0 0 4px rgba(239, 83, 80, 0.5));
}

.hud-status-btn--hungry .hud-status-btn-img {
    filter: drop-shadow(0 0 4px rgba(255, 183, 77, 0.55));
}

.hud-status-btn--club_mastery .hud-status-btn-img {
    filter: drop-shadow(0 0 4px rgba(255, 213, 79, 0.55));
}

.hud-status-btn--bow_pierce:not(.on-cooldown) .hud-status-btn-img {
    filter: drop-shadow(0 0 4px rgba(129, 212, 250, 0.55));
}

.hud-status-btn:active {
    transform: scale(0.92);
}

.status-effect-detail-root,
#status-effect-detail-root {
    position: fixed;
    inset: 0;
    z-index: 56;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.status-effect-detail-root:not([hidden]) {
    pointer-events: auto;
}

.status-effect-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.status-effect-detail-panel {
    position: relative;
    z-index: 1;
    width: min(320px, 94vw);
    max-height: min(70vh, 360px);
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(180deg, #2e241c 0%, #1a1410 100%);
}

.status-effect-detail-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-effect-detail-icon {
    flex-shrink: 0;
    image-rendering: pixelated;
    border: none;
    background: transparent;
}

.status-effect-detail-kind {
    margin: 0;
    font-size: var(--text-xs);
    color: #9a8f82;
    letter-spacing: 0.04em;
}

.status-effect-detail-rows {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.status-effect-detail-row {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) minmax(0, 1.5fr);
    gap: 6px;
    font-size: var(--text-sm);
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.28);
}

.status-effect-detail-row dt {
    margin: 0;
    color: #9a8f82;
    font-weight: normal;
}

.status-effect-detail-row dd {
    margin: 0;
    color: #fff;
    font-weight: bold;
    text-align: right;
    line-height: 1.35;
}

.status-effect-detail-close {
    width: 100%;
    min-height: var(--touch-min);
}
