.combat-death-notice {
    position: absolute;
    z-index: 20;
    top: 26%;
    left: 50%;
    transform: translateX(-50%);
    width: min(620px, 90%);
    padding: 22px 16px;
    text-align: center;
    pointer-events: none;
    color: #ffe2d9;
    background: linear-gradient(90deg, transparent, rgba(45, 5, 5, 0.92) 18%, rgba(45, 5, 5, 0.92) 82%, transparent);
    text-shadow: 0 2px 6px #190303;
}

.combat-death-notice-title {
    font-size: clamp(32px, 6vw, 58px);
    font-weight: 800;
    line-height: 1.1;
    color: #ff8575;
}

.combat-death-notice-detail {
    margin-top: 10px;
    font-size: clamp(14px, 2.5vw, 20px);
    line-height: 1.4;
}

.exploration-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99000;
    background: radial-gradient(circle at 50% 40%, rgba(10, 10, 14, 0.96), rgba(3, 3, 5, 0.99));
    align-items: center;
    justify-content: center;
}

.exploration-frame {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.exploration-overlay--arena {
    background: radial-gradient(circle at 50% 30%, rgba(6, 8, 12, 0.82), rgba(2, 2, 4, 0.92));
    backdrop-filter: blur(3px);
}

.exploration-overlay--arena .exploration-frame {
    width: min(1120px, 95vw);
    height: min(800px, 93vh);
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, rgba(18, 20, 26, 0.98), rgba(9, 11, 15, 0.99));
    border: 1px solid var(--exp-border, #c9a227);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 44px var(--exp-glow, rgba(201, 162, 39, 0.2));
}

.exploration-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    box-sizing: border-box;
    background: rgba(8, 10, 14, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    flex: 0 0 auto;
}

body:has(.exploration-overlay--valley[style*="display: flex"]) .speed-controls-fixed {
    display: none;
}

.exploration-overlay--valley .exploration-frame {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    gap: 0;
    padding: 0;
    overflow: hidden;
    background: #1b2920;
    border-color: #65735a;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    --exp-border: #65735a;
    --exp-hud: #ced3b7;
}

.exploration-overlay--valley .exploration-header {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 15;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    background: linear-gradient(#1b2920ed, #1b292000);
    pointer-events: none;
}

.exploration-overlay--valley .exploration-title {
    color: #d8ddbd !important;
    font-size: 1.05em;
    text-shadow: 0 2px 4px #0006;
}

.exploration-overlay--valley .exploration-quick-controls {
    position: absolute;
    top: 10px;
    left: 50%;
    z-index: 16;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 12px;
    max-width: min(72vw, 760px);
    padding: 7px 10px;
    transform: translateX(-50%);
    pointer-events: auto;
    background: linear-gradient(180deg, #1d2c21e8, #152018e8);
    border: 1px solid #8f9d7066;
    border-radius: 6px;
    box-shadow: 0 3px 12px #0008;
}

.exploration-overlay--valley .exploration-quick-controls .exp-ctrl-row {
    justify-content: center;
    gap: 5px;
}

.exploration-overlay--valley .exploration-quick-controls .sect-btn {
    min-height: 30px;
    padding: 5px 9px;
    background: #17241b;
    border: 1px solid #68785866;
    border-radius: 4px;
    color: #c8d0b8;
    font-size: 11px;
    box-shadow: none;
    text-shadow: none;
}

.exploration-overlay--valley .exploration-quick-controls .sect-btn:hover {
    background: #344a34;
    border-color: #8f9d70;
}

.exploration-overlay--valley .exploration-quick-controls .sect-btn--primary {
    background: #4c6242;
    border-color: #a4b17a;
    color: #f0eed2;
    box-shadow: inset 0 -2px #bdc18a70;
}

.exploration-overlay--valley .exploration-quick-controls .sect-search {
    width: 70px !important;
    min-width: 0;
    height: 30px;
    box-sizing: border-box;
    padding: 4px 8px;
    background: #111e16;
    border: 1px solid #68785880;
    border-radius: 4px;
    color: #e0e4c9;
    font-size: 12px;
}

.exploration-overlay--valley .exploration-exit-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    pointer-events: auto;
    background: #142118;
    border-color: #69715380;
    color: #cbd1b4;
    border-radius: 4px;
}

.exploration-overlay--valley .exploration-exit-btn:hover {
    background: #354734;
}

.exploration-overlay--valley .exploration-viewport {
    overflow: hidden;
}

.exploration-overlay--valley .exploration-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    max-height: 32%;
    overflow-y: auto;
    background: linear-gradient(#243326, #19251d);
    border: 0;
    border-top: 1px solid #9a9d6759;
    border-radius: 0;
    box-shadow: inset 0 1px #d3d5a509;
}

.exploration-overlay--valley .exp-ctrl-row {
    justify-content: flex-start;
    gap: 5px;
    min-width: 0;
}

.exploration-overlay--valley .exp-ctrl-row:first-child {
    flex: 1 1 auto;
}

.exploration-overlay--valley .exp-ctrl-label {
    color: #b8c1a4;
    font-size: 0.72em;
}

.exploration-overlay--valley .exp-ctrl-label:first-child {
    min-width: 38px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #a6b28e;
}

.exploration-overlay--valley .exp-ctrl-row:first-child .exp-ctrl-label:last-child {
    margin-left: auto;
}

.exploration-overlay--valley .exploration-controls .sect-btn {
    min-height: 30px;
    padding: 5px 9px;
    background: #17241b;
    border: 1px solid #68785866;
    border-radius: 4px;
    color: #c8d0b8;
    font-size: 11px;
    box-shadow: none;
    text-shadow: none;
}

.exploration-overlay--valley .exploration-controls .sect-btn:hover {
    background: #344a34;
    border-color: #8f9d70;
}

.exploration-overlay--valley .exploration-controls .sect-btn--primary {
    background: #4c6242;
    border-color: #a4b17a;
    color: #f0eed2;
    box-shadow: inset 0 -2px #bdc18a70;
}

.exploration-overlay--valley .exploration-controls .sect-search {
    width: 70px !important;
    min-width: 0;
    height: 30px;
    box-sizing: border-box;
    padding: 4px 8px;
    background: #111e16;
    border: 1px solid #68785880;
    border-radius: 4px;
    color: #e0e4c9;
    font-size: 12px;
}

.exploration-overlay--valley .exploration-controls :focus-visible,
.exploration-overlay--valley .exploration-exit-btn:focus-visible {
    outline: 2px solid #cad698;
    outline-offset: 2px;
}

.exploration-overlay--valley .exploration-actionbar {
    flex-shrink: 0;
}

.exploration-overlay--valley .exploration-actionbar:empty {
    display: none;
}

.exploration-overlay--valley .exploration-loot {
    position: absolute;
    left: max(12px, env(safe-area-inset-left));
    bottom: 12px;
    z-index: 12;
    width: 260px;
    max-width: 65%;
    color: #ced3b7;
    background: #17241bdd;
    border: 1px solid #86916c80;
    border-radius: 5px;
}

.exploration-overlay--valley .exploration-loot:not([open]) {
    width: auto;
}

.exploration-loot > summary {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 700;
}

.exploration-loot > summary:focus-visible {
    outline: 2px solid #cad698;
    outline-offset: 2px;
}

.exploration-overlay--valley .exploration-loot .exploration-log {
    position: static;
    width: 100%;
    max-width: none;
    max-height: min(220px, 25vh);
    transform: none;
    border: 0;
    background: none;
    box-shadow: none;
    pointer-events: auto;
}

.exploration-loot .exp-log-title {
    display: none;
}

.exploration-loot-history-title {
    margin: 8px 12px 0;
    padding: 10px 0 4px;
    border-top: 2px solid #86916c80;
    color: #ced3b7;
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.exploration-overlay--valley .exploration-log {
    background: #17241bdd;
    border-color: #86916c80;
    border-radius: 5px;
    box-shadow: 0 4px 16px #07110955;
}

@media (max-width: 720px) {
    .exploration-overlay--valley .exploration-header {
        padding: 10px 12px;
    }

    .exploration-overlay--valley .exploration-controls {
        gap: 6px;
        max-height: 35%;
        overflow-y: auto;
    }

    .exploration-overlay--valley .exploration-controls .sect-btn {
        min-height: 36px;
    }

    .exploration-overlay--valley .exp-ctrl-row:first-child .exp-ctrl-label:last-child {
        flex-basis: 100%;
        margin: 4px 0 0;
    }
}

.exp-ctrl-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.exp-ctrl-label {
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--exp-hud, #f2d675);
}

.exploration-overlay--arena .exploration-log {
    top: auto;
    bottom: 12px;
    transform: none;
    width: 240px;
    max-width: 34%;
    max-height: 46%;
}

.exploration-header {
    width: 100%;
}

.exploration-overlay--valley .exploration-header {
    align-items: flex-start;
    background: none;
}

.exploration-combat-panel {
    width: 300px;
    max-width: calc(100vw - 76px);
    box-sizing: border-box;
    padding: 14px;
    pointer-events: auto;
    color: #d9d8ba;
    border: 1px solid #b09b626e;
    border-radius: 3px 12px 3px 12px;
    background: repeating-linear-gradient(115deg, #d5c49204 0 1px, transparent 1px 5px), repeating-linear-gradient(25deg, #0000000d 0 1px, transparent 1px 4px), linear-gradient(145deg, #293a2af5, #111e18f5);
    box-shadow: inset 0 0 0 3px #111c1766, inset 0 0 0 4px #b09b6226, 0 6px 20px #0005;
}

.exploration-overlay--valley .exploration-combat-panel .exploration-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.35;
    color: #eadbb0 !important;
    letter-spacing: 0.035em;
    padding-bottom: 10px;
    border-bottom: 1px solid #b09b624d;
}

.exploration-vitals {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #b09b624d;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.exploration-vital-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.exploration-vital-row strong {
    overflow-wrap: anywhere;
    text-align: right;
    color: #d9ebd2;
}

.exploration-vital-row--lifespan {
    margin-top: 6px;
    color: #cfb87a;
}

.exploration-vital-row--lifespan strong { color: #e4d3a2; }

.exploration-hp-bar {
    display: block;
    appearance: none;
    width: 100%;
    height: 7px;
    margin-top: 5px;
    border: 1px solid #93a36c59;
    background: #101a14;
    accent-color: #81b67a;
}

.exploration-hp-bar::-webkit-progress-bar { background: #101a14; }
.exploration-hp-bar::-webkit-progress-value { background: linear-gradient(90deg, #497b60, #a5c789); }
.exploration-hp-bar::-moz-progress-bar { background: #81b67a; }

.exploration-overlay--valley .exploration-combat-panel .exploration-controls {
    padding: 10px 0;
    margin: 0;
    max-height: none;
    overflow: visible;
    border: 0;
    background: none;
    box-shadow: none;
}

.exploration-combat-panel .exploration-controls .sect-btn {
    width: 100%;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 0.06em;
}

.exploration-idling-btn {
    pointer-events: auto;
}

.exploration-combat-panel > .exploration-idling-btn {
    width: 100%;
}

.exploration-current-loot {
    font-size: 12px;
}

.exploration-current-loot #explorationLootPreview {
    margin-top: 10px;
    max-height: min(440px, 45vh);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8a9567 #18251b;
}

.exploration-current-loot .combat-preview-title { display: none; }

.exploration-current-loot .combat-preview-monster > svg,
.exploration-current-loot .combat-preview-monster > img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.exploration-current-loot .db-loot { grid-template-columns: minmax(0, 1fr) !important; }
.exploration-current-loot .db-loot-item {
    flex-direction: row !important;
    padding: 2px 0 !important;
    border: 0 !important;
    background: none !important;
    text-align: left;
    font-size: 11px !important;
}
.exploration-current-loot .db-loot-item > span:first-child {
    width: 24px !important;
    height: 24px !important;
}
.exploration-current-loot .db-loot-item svg { width: 24px; height: 24px; }
.combat-preview-reward-label { color: #e0cea1; margin-bottom: 6px; }

@media (max-width: 1100px) {
    .exploration-overlay--valley .exploration-quick-controls {
        top: auto;
        bottom: max(10px, env(safe-area-inset-bottom));
        max-width: calc(100% - 32px);
        width: max-content;
    }

    .exploration-overlay--valley .exploration-loot { bottom: 125px; }

    .exploration-combat-panel { width: 260px; padding: 12px; }
    .exploration-current-loot #explorationLootPreview { max-height: 30vh; }
}

.exploration-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 6px;
}

.exploration-title {
    font-size: 1.15em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.exploration-exit-btn {
    background: rgba(231, 76, 60, 0.18);
    border: 1px solid rgba(231, 76, 60, 0.6);
    color: #ff9a8f;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 1em;
    line-height: 1;
}

.exploration-exit-btn:hover {
    background: rgba(231, 76, 60, 0.32);
}

.exploration-viewport {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

.exploration-actionbar {
    width: 100%;
    max-width: 640px;
    height: 60px;
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    box-sizing: border-box;
    background: rgba(8, 10, 14, 0.72);
    border: 1px solid var(--exp-border, #c9a227);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.exploration-action-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82em;
    font-style: italic;
    letter-spacing: 0.02em;
}

.exploration-action-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--exp-border, #c9a227);
    color: var(--exp-hud, #f2d675);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.08s ease;
}

.exploration-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.exploration-action-btn:active {
    transform: translateY(1px);
}

.exploration-action-btn[data-kind="exit"] {
    border-color: rgba(231, 76, 60, 0.7);
    color: #ff9a8f;
}

.exp-action-ico {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.exp-sprite > div {
    display: flex;
    align-items: center;
    justify-content: center;
}

.exp-sprite svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.exp-enemy-label {
    z-index: 6;
    pointer-events: none;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
    overflow: visible;
}

.exp-enemy-realm {
    display: inline-block;
    background: rgba(20, 6, 6, 0.85);
    border: 1px solid rgba(255, 90, 74, 0.7);
    color: #ffd0c8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 1px 4px;
    border-radius: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.exp-enemy-stage {
    color: #ff8a7a;
}

.exploration-floor-badge {
    background: rgba(6, 8, 12, 0.82);
    border: 1px solid var(--exp-border, #c9a227);
    color: var(--exp-hud, #f2d675);
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.exp-pkmodal {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 40%, rgba(8, 8, 12, 0.9), rgba(2, 2, 4, 0.97));
    backdrop-filter: blur(5px);
    padding: 20px;
    box-sizing: border-box;
}

.exp-pkmodal-box {
    max-width: 620px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(20, 20, 26, 0.96), rgba(10, 10, 14, 0.98));
    border: 1px solid var(--exp-border, #c9a227);
    border-radius: 14px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 40px var(--exp-glow, rgba(201, 162, 39, 0.25));
    padding: 18px 20px 20px;
    text-align: center;
}

.exp-pkmodal-title {
    font-size: 1.3em;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.exp-pkmodal-stage {
    position: relative;
    margin: 0 auto 14px;
    max-width: 100%;
    overflow: hidden;
}

.exp-pk-chest {
    position: absolute;
    left: 50%;
    top: 150px;
    width: 172px;
    height: 172px;
    transform: translateX(-50%);
    filter: drop-shadow(0 0 16px var(--exp-glow, rgba(201, 162, 39, 0.55)));
    z-index: 1;
}

.exp-pk-player {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 132px;
    height: 210px;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
}

.exp-pk-player svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.exp-pk-item {
    position: absolute;
    z-index: 3;
    filter: drop-shadow(0 0 10px var(--exp-glow, rgba(201, 162, 39, 0.8)));
}

.exp-pk-item svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.exp-pk-item.fly {
    animation: exp-pk-fly 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes exp-pk-fly {
    0%   { transform: translate(var(--fx, 0), var(--fy, 0)) scale(0.3); opacity: 0; }
    22%  { opacity: 1; }
    72%  { transform: translate(0, 0) scale(1.18); }
    100% { transform: translate(0, 0) scale(1); opacity: 1; }
}

.exp-pkmodal-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    margin-bottom: 16px;
}

.exp-pkmodal-box.revealed .exp-pkmodal-cards {
    opacity: 1;
    transform: translateY(0);
}

.exp-pk-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 12px;
    width: 260px;
    box-sizing: border-box;
}

.exp-pk-card-art {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    filter: drop-shadow(0 0 6px var(--exp-glow, rgba(201, 162, 39, 0.5)));
}

.exp-pk-card-art svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.exp-pk-card-name {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--accent, #f2d675);
    line-height: 1.15;
}

.exp-pk-card-sub {
    font-size: 0.72em;
    color: rgba(255, 255, 255, 0.55);
    margin: 2px 0 6px;
}

.exp-pk-card-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exp-pk-stat {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.7);
}

.exp-pk-stat b {
    color: #fff;
    font-weight: 600;
}

.exp-pkmodal-close {
    background: var(--accent, #f2d675);
    color: #1a1206;
    border: none;
    border-radius: 8px;
    padding: 9px 26px;
    font-size: 0.95em;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    transition: filter 0.12s ease, transform 0.08s ease;
}

.exp-pkmodal-close:hover {
    filter: brightness(1.08);
}

.exp-pkmodal-close:active {
    transform: translateY(1px);
}

.exploration-viewport { position: relative; }

.exploration-log {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 12;
    max-width: 42%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.82em;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 2px rgba(0,0,0,0.9);
}

.exp-log-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

/* Loot log — left-side panel (overrides earlier bottom-left rules) */
.exploration-log {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    width: 288px;
    max-width: 34vw;
    max-height: 76vh;
    z-index: 12;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(8, 10, 14, 0.72);
    border: 1px solid var(--exp-border, #c9a227);
    border-radius: 10px;
    box-shadow: 0 6px 26px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.exp-log-title {
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--exp-hud, #f2d675);
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.exp-log-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 12px;
    overflow-y: auto;
}

.exp-log-empty {
    font-size: 0.74em;
    color: #7f8a86;
    font-style: italic;
}

.exp-log-line {
    font-size: 0.8em;
    line-height: 1.3;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loot log rows with icons */
.exp-log-line.has-ico {
    display: flex;
    align-items: center;
    gap: 8px;
}
.exp-log-ico {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.exp-log-ico svg { width: 100%; height: 100%; }
.exp-log-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.exploration-residents {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 6;
    width: 190px;
    max-width: 46vw;
    background: rgba(8, 12, 14, 0.82);
    border: 1px solid rgba(242, 214, 117, 0.28);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    overflow: hidden;
}

.exp-residents-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.exp-residents-title {
    font-size: 0.82em;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--exp-hud, #f2d675);
}

.exp-residents-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e7e7ce;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    line-height: 1;
    font-size: 1.05em;
    cursor: pointer;
    flex: 0 0 auto;
}

.exp-residents-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    max-height: 42vh;
    overflow-y: auto;
}

.exploration-residents.exp-residents--collapsed .exp-residents-list {
    display: none;
}

.exp-resident {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 7px;
    color: #dfe4d6;
    font-size: 0.84em;
    cursor: pointer;
}

.exp-resident:hover {
    background: rgba(255, 255, 255, 0.08);
}

.exp-resident--active {
    border-color: rgba(242, 214, 117, 0.7);
    background: rgba(242, 214, 117, 0.14);
    color: #fdeeb0;
}

.exp-resident-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 720px) {
    .exploration-residents {
        width: 150px;
        top: 8px;
        left: 8px;
    }
    .exp-residents-list {
        max-height: 32vh;
    }
}
.exploration-overlay--capture .exploration-loot,
.exploration-overlay--capture .exploration-log {
    display: none;
}

.exploration-overlay--capture .exploration-controls {
    text-align: center;
    font-size: 12px;
}

.exploration-overlay--capture .exploration-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.exploration-overlay--assault .exploration-frame {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.exploration-overlay--assault .exploration-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 15;
    box-sizing: border-box;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    background: linear-gradient(#132523f0, #13252300);
    pointer-events: none;
}

.exploration-overlay--assault .exploration-exit-btn {
    pointer-events: auto;
    flex-shrink: 0;
}

.exploration-overlay--assault .exploration-controls {
    position: absolute;
    bottom: 0;
    z-index: 15;
    width: auto;
    max-width: 100%;
    padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-radius: 10px 10px 0 0;
    background: #132523e8;
}

.exploration-overlay--assault .exploration-actionbar:empty {
    display: none;
}

body:has(.exploration-overlay--assault[style*="display: flex"]) .speed-controls-fixed {
    display: none;
}
