body {
    /* The cold, dead slab of the morgue floor */
    background-color: #e0e2e5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1em 0;
}

/* Base style for main modules (Institutional Gray Theme) */
.m1, .m2 {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    max-width: 600px;
    width: calc(100% - 2em);
    margin: .5em auto;
    background-color: #f4f5f7; /* Pale ash */
    color: #2c2c2c; /* Deep shadow */
    border: 1px solid #b8b8b8; /* Cold metal */
    border-radius: 12px;
    padding: 15px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); /* Darker, heavier shadow */
    font-size: 14px;
    line-height: 1.6;
}

/* Details element base style */
.det {
    margin-bottom: 10px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}
.det:last-child { margin-bottom: 0; }

/* Summary (collapsible header) - The standard, lifeless panels */
.sum {
    background: linear-gradient(to right, #e8e8e8, #f5f5f5);
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    color: #4a4a4a; /* Muted, dead gray */
    list-style: none;
    display: flex;
    align-items: center;
    transition: background .3s, color .3s;
    border-bottom: 1px solid transparent;
}
.sum::-webkit-details-marker { display: none; }
.sum:hover { 
    background: #dcdcdc; 
    color: #111111;
}
.sum::before {
    content: '⛓️'; /* Cold iron chains instead of a flower */
    margin-right: 8px;
    font-size: .9em;
    filter: grayscale(100%);
    transition: transform .2s;
}
.det[open] > .sum::before { transform: rotate(90deg); }

/* 
=======================================================================
  🩸 THE TARGET: XIA LISHENG (.sum.phl) 🩸
  This is where the horror pops. Blood red outer frame.
=======================================================================
*/
.sum.phl {
    background: #ffffff; /* Ghostly white to make the red scream */
    border: 2px solid #8a0303; /* Thick, coagulated blood border */
    border-left: 6px solid #8a0303; /* Heavy arterial slash on the left */
    color: #8a0303; /* Blood text */
    box-shadow: inset 0 0 15px rgba(138, 3, 3, 0.05), 0 0 8px rgba(138, 3, 3, 0.2); /* Faint bloody glow */
}
.sum.phl::before {
    content: '🩸'; /* A fresh drop of blood for our final girl */
    filter: none; /* Let it bleed */
}

/* Internal content dividers */
.con { padding: 12px; border-top: 1px dashed #cccccc; }
.con.npd { padding: 0; }

/* Grid for environment info */
.grd { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; }
.itm {
    display: flex; align-items: baseline; 
    background: #eeeeee; /* Concrete gray */
    padding: 8px 12px; border-radius: 6px; 
    border-left: 3px solid #555555; /* Dark slate */
    font-size: .95em; overflow: hidden;
}
.itm .key { font-weight: bold; color: #1a1a1a; margin-right: 8px; flex-shrink: 0; }
.itm .val { color: #444444; white-space: normal; overflow: hidden; text-overflow: ellipsis; }
.itm.ful { grid-column: 1 / -1; }

/* Main story text paper style & Plot */
.pap, .plo {
    background: #ffffff; padding: 15px 18px; border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); margin: 15px 0;
    border-left: 3px solid #333333; font-size: 1.05em;
    color: #222222; text-align: justify; line-height: 1.7;
}
.plo { font-size: 1em; margin: 0; padding: 12px; border-left-width: 2px; }
.dvi { height: 1px; background: linear-gradient(to right, transparent, #888888, transparent); margin: 15px 0; } /* Gray divider */

/* Your status & Other characters */
.cls p, .oin p { margin: 6px 0; font-size: .95em; }
.cls p strong { color: #111111; }

/* --- Inventory Container (Muted & Menacing) --- */
.ivc { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #b0b0b0; text-align: left; }
.ivc-line {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px; 
    flex-wrap: wrap; 
}
.ivc .ebw { position: relative; display: inline-block; }
.ivc .itm-tag { 
    background: #333333; /* Pitch dark */
    border: 1px solid #1a1a1a; 
    color: #e0e0e0; 
    padding: 6px 14px; 
    border-radius: 6px; 
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}
/* The Jump Scare Hover: Turns blood red when interacted with */
.ivc .ebw:hover .itm-tag, .ivc .ebw:focus-within .itm-tag { 
    background: #8a0303; 
    border-color: #4a0000;
    color: #ffffff;
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(138, 3, 3, 0.4);
}

/* Tooltip Bubbles (Grime and Ash) */
.ivc .bub { border-color: #555555 !important; background: #f9f9f9 !important;}
.ivc .bub::after { border-top-color: #555555 !important; }
.ivc .bhd { color: #111111 !important; border-bottom-color: #cccccc !important; }
.ivc .bde { text-align: left; line-height: 1.5; color: #333; }

/* Character card list */
.crd { border-bottom: 1px solid #dddddd; }
.crd:last-child { border-bottom: none; }
.bsm { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; background: #fdfdfd; }
.bsm::-webkit-details-marker { display: none; }
.bna { font-weight: bold; color: #333333; }
.bba { display: flex; gap: 5px; }
.bad { font-size: .75em; padding: 2px 8px; border-radius: 10px; color: #fff; }
.bad.lov { background: #555555; } /* Muted affection */
.bdt { padding: 10px 15px; background: #f4f4f4; font-size: .9em; color: #444; border-top: 1px solid #e0e0e0; }
.bro { margin-bottom: 4px; }
.bxp { margin-top: 8px; background: #ebebeb; padding: 8px; border-radius: 6px; border: 1px dashed #cccccc; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.xte { width: 100%; font-weight: bold; color: #111111; font-size: .85em; margin-bottom: 2px; }
.bxp span { background: #ffffff; padding: 2px 5px; border-radius: 3px; font-size: .85em; color: #333333; border: 1px solid #ddd; }
.xtg { width: 100%; margin-top: 4px; font-style: italic; color: #666; }

/* Current character's detailed view */
.cvi p { margin: 4px 0; font-size: .95em; }
.cvi p strong { color: #1a1a1a; }
.clb { margin-top: 8px; padding: 8px; background: #e8e8e8; border-radius: 6px; font-size: .9em; display: flex; flex-wrap: wrap; gap: 4px 10px; color: #444; border: 1px solid #ccc; }
.cst { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 12px 0; }
.sti { font-size: .95em; font-weight: bold; color: #222222; background: #f0f0f0; padding: 8px 10px; border-radius: 6px; border-left: 3px solid #777; }
.dtx { display: block; font-size: .85em; color: #555; font-weight: normal; margin-top: 3px; line-height: 1.4; }

/* Sensitive Area (Stripped of warmth) */
.etz { text-align: center; color: #555555; font-size: .9em; margin: 15px 0 10px 0; font-style: italic; font-weight: bold; letter-spacing: 1px; }
.etc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; justify-items: center; padding-bottom: 10px; }
.ebw { position: relative; display: block; }
.etc .tag {
    width: auto;
    min-width: 85px;
    max-width: 140px;
    padding: 6px 10px;
}
.tag {
    display: inline-block; padding: 6px 12px; box-sizing: border-box;
    text-align: center; background: #ffffff; border: 1px solid #777777; color: #333333;
    border-radius: 20px; font-size: .9em; font-weight: bold; cursor: pointer; transition: all .2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ebw:hover .tag, .ebw:focus-within .tag { background: #333333; color: #ffffff; transform: translateY(-2px); border-color: #111; }

/* Bubble Popup Positioning */
.bub {
    visibility: hidden; opacity: 0; position: absolute; bottom: 100%; margin-bottom: 10px;
    left: 50%; transform: translateX(-50%); min-width: 240px; max-width: 280px;
    background: #ffffff; border: 2px solid #555555; border-radius: 8px; padding: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .25); z-index: 100;
    transition: all .2s; pointer-events: none; word-wrap: break-word;
}
.bub::after {
    content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px;
    border-width: 6px; border-style: solid; border-color: #555555 transparent transparent transparent;
}
.ebw:hover .bub, .ebw:focus-within .bub {
    visibility: visible; opacity: 1; transform: translateX(-50%) translateY(-5px); pointer-events: auto;
}
.bhd { font-weight: bold; color: #111111; border-bottom: 1px dashed #999999; padding-bottom: 4px; margin-bottom: 4px; }
.bst { font-size: .85em; color: #444444; margin-bottom: 4px; font-weight: bold; }
.bde { font-size: .9em; color: #333333; line-height: 1.4; }

/* Memory Area & Option Area */
.mmb pre { background-color: #eeeeee; padding: 1em; border-radius: 5px; border: 1px inset #cccccc; white-space: pre-wrap; word-wrap: break-word; font-size: .9em; color: #222; line-height: 1.5; font-family: monospace; }
.m2 { counter-reset: option-counter; }
.m2 .act { 
    text-align: center;
    color: #1a1a1a;
    font-weight: bold;
    margin-top: 20px; 
    margin-bottom: 15px;
    font-size: 1.05em;
    padding: 5px 0 10px 0;
    border-top: 1px dashed #aaaaaa; 
    border-bottom: 1px dashed #aaaaaa;
}

/* pre as button container, scoped to m2 */
.m2 pre {
    position: relative !important;
    margin: 12px 0 !important; 
    overflow: hidden !important;
    border-radius: 12px !important; 
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 55px;
}
.m2 pre div[class*="border-b"] {
    position: absolute !important; top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    border: none !important; background: transparent !important;
    padding: 0 !important; margin: 0 !important;
    z-index: 2; pointer-events: none;
}
.m2 pre div[class*="border-b"] > div:first-child { display: none !important; }
.m2 pre div[data-tooltip-id] {
    position: absolute !important; top: 0; left: 0;
    width: 100% !important; height: 100% !important;
    margin: 0 !important; padding: 0 !important;
    display: block !important; cursor: pointer !important;
    background: transparent !important; border: none !important;
    pointer-events: auto; z-index: 3;
}
.m2 pre div[data-tooltip-id] .style_copyIcon__GJL9e { display: none !important; }

/* Code content area, styled as option button (Tombstone style) */
.m2 pre div[node="[object Object]"] {
    position: relative; z-index: 1;
    display: block !important;
    pointer-events: none;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%) !important;
    border: 1px solid #cccccc !important; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255,255,255,0.8) !important;
    color: #222222 !important; 
    font-family: "Kosugi Maru", sans-serif !important;
    font-size: 1.05em !important; 
    padding: 12px 20px 12px 65px !important; 
    margin: 0 !important;
    border-radius: 12px !important; 
    min-height: 55px;
    white-space: pre-wrap;
    word-break: break-word;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); 
    counter-increment: option-counter;
}

/* Option Letter (A, B, C...) */
.m2 pre div[node="[object Object]"]::before {
    content: counter(option-counter, upper-alpha); 
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px; 
    height: 32px;
    background: linear-gradient(45deg, #444444 0%, #111111 100%); 
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.1em; 
    font-weight: bold;
    border: 2px solid rgba(255,255,255,0.3); 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); 
    z-index: 2;
}
.m2 pre div[node="[object Object]"] code {
    display: block; color: inherit !important;
    background: transparent !important; padding: 0 !important;
    margin: 0 !important; font-family: inherit !important;
    font-size: inherit !important; white-space: pre-wrap;
}
/* Hover effect - Dips into darkness */
.m2 pre:hover div[node="[object Object]"] {
    transform: translateY(-4px); 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.4) !important; 
    background: linear-gradient(135deg, #e8e8e8 0%, #d1d1d1 100%) !important; 
    border-color: #888888 !important; 
}
/* Active effect (on press) */
.m2 pre:active div[node="[object Object]"] {
    transform: translateY(1px) !important; 
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(0,0,0,0.2) !important; 
    background: linear-gradient(135deg, #dcdcdc 0%, #c8c8c8 100%) !important; 
    border-color: #555555 !important;
}

/* SELECT/COPIED Box Styling */
.m2 pre div[node="[object Object]"]::after {
    content: 'SELECT'; 
    position: absolute;
    right: 15px; 
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 10px;
    background-color: rgba(26, 26, 26, 0.8); 
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 6px;
    opacity: 0; 
    transition: all 0.2s ease-out;
    pointer-events: none; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.m2 pre:hover div[node="[object Object]"]::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0); 
}
.m2 pre div[data-tooltip-id]:active + div[node="[object Object]"]::after {
    content: 'COPIED!';
    background-color: #8a0303; /* Blood red confirmation */
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1.05); 
    box-shadow: 0 3px 8px rgba(138, 3, 3, 0.5);
}

/* Click overlay hint */
.m2 pre div[data-tooltip-id]::after {
    content: ''; 
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0.2) 10px,
        rgba(0, 0, 0, 0.2) 20px
    );
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.6em; 
    font-weight: bold;
    opacity: 0; transition: opacity 0.1s;
    pointer-events: none; z-index: 4;
    border-radius: 12px; 
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}
.m2 pre div[data-tooltip-id]:active::after {
    content: '✔ 已复制'; 
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .m1, .m2 {
        width: 100%;
        margin: .5em 0;
        border-radius: 0;
        padding: 10px;
    }
    .grd { grid-template-columns: 1fr; }
    .itm .val { white-space: normal; text-overflow: clip; }
    .etc { grid-template-columns: 1fr 1fr; }
    .ebw .bub {
        position: fixed;
        left: 50%;
        top: 50%;
        bottom: auto;
        transform: translate(-50%, -50%);
        max-width: 90vw;
        margin-bottom: 0;
    }
    .ebw .bub::after { display: none; }
    .ebw:not(:hover):not(:focus-within) .bub {
        visibility: hidden; opacity: 0;
    }
    .ebw:hover .bub, .ebw:focus-within .bub {
        visibility: visible; opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        transition: opacity 0.2s, transform 0.2s;
    }
    .m2 pre div[node="[object Object]"]::after { 
        right: 10px; padding: 4px 8px; font-size: 0.7em; border-radius: 4px;
    }
}

/* 
=======================================================================
  🩸 PLATFORM OVERRIDES & NECROTIC LOADING ANIMATION 🩸
=======================================================================
*/

.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* The Blood Pulse Animation */
@keyframes blood-spinner-outer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes blood-glow {
    0%, 100% { text-shadow: 0 0 8px rgba(138, 3, 3, 0.4); opacity: 0.8; }
    50% { text-shadow: 0 0 18px rgba(255, 0, 0, 0.8); opacity: 1; }
}

.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: auto !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    padding: 8px 0 !important;
}

/* Injecting the Cursed Ring SVG */
.flex.items-center.justify-center.w-6.h-5::before {
    content: '' !important;
    display: block !important;
    width: 38px !important;
    height: 38px !important;
    flex-shrink: 0 !important;
    /* Custom SVG: Jagged, pulsing red and black rings instead of a rainbow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cdefs%3E%3ClinearGradient id='blood1' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%238a0303;stop-opacity:1' /%3E%3Cstop offset='50%25' style='stop-color:%23ff0000;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%233a0000;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='60' cy='60' r='50' fill='none' stroke='url(%23blood1)' stroke-width='6' stroke-linecap='square' stroke-dasharray='100 40 40 40' /%3E%3Ccircle cx='60' cy='60' r='38' fill='none' stroke='%23111111' stroke-width='4' stroke-dasharray='80 40' opacity='0.9' /%3E%3Ccircle cx='60' cy='60' r='25' fill='none' stroke='%238a0303' stroke-width='2' stroke-dasharray='20 20' opacity='0.6' /%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    animation: blood-spinner-outer 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite !important;
    filter: drop-shadow(0 0 8px rgba(138, 3, 3, 0.6)) !important;
    position: relative !important;
}

/* The Eerie Text Override */
.flex.items-center.justify-center.w-6.h-5::after {
    content: '亡妻回忆中...请切换到2-3记忆游玩...' !important;
    display: inline-block !important;
    font-size: 14px !important;
    color: #8a0303 !important; /* Arterial red */
    font-weight: bold !important;
    letter-spacing: 1px !important;
    white-space: nowrap !important;
    animation: blood-glow 2.5s ease-in-out infinite !important;
}

@media (max-width: 768px) {
    .flex.items-center.justify-center.w-6.h-5 {
        flex-wrap: wrap !important;
        height: auto !important;
        gap: 12px !important;
        justify-content: center !important;
    }
    .flex.items-center.justify-center.w-6.h-5::before {
        width: 32px !important;
        height: 32px !important;
    }
    .flex.items-center.justify-center.w-6.h-5::after {
        font-size: 13px !important;
        max-width: 90% !important;
        white-space: normal !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }
}

/* Chat Box Color Strip Removal */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* Global Chat Box Background - Overcast Concrete */
.bg-gray-100\/90.relative.inline-block {
    background: linear-gradient(140deg, #ececec, #d9d9d9) !important;
    border: 1px solid #bfbfbf !important;
    border-radius: 12px !important;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* High Contrast Text for Readability */
.markdown-body {
    color: #1a1a1a !important;
    text-shadow: none !important;
}

/* Muted, Menacing Action Buttons */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #333333 !important;
    border-radius: 16px !important;
    padding: 4px 12px !important;
    margin: 0 4px !important;
    font-weight: bold !important;
    transition: all 0.2s ease-in-out !important;
    border: 1px solid transparent !important;
}

/* Hover: The buttons bleed */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    background-color: #8a0303 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(138, 3, 3, 0.4) !important;
}

/* Bottom Metrics (Tokens/Model Name) - Charred Ash */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #555555 !important;
    opacity: 0.9 !important;
    padding: 0 8px !important;
    font-weight: bold !important;
}