.exploration-overlay--chud {
    background: #07100d;
    backdrop-filter: none;
}

.exploration-overlay--chud .exploration-frame--chud {
    position: relative;
    display: block;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    gap: 0;
    overflow: hidden;
    background: #07100d;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.exploration-overlay--chud .exploration-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.chud-open #worldRoutineDock {
    display: none !important;
}

.chud-host {
    --chud-gold: #c9a45c;
    --chud-gold-hi: #f0d898;
    --chud-jade: #5fd4a8;
    --chud-jade-dim: #2f7d64;
    --chud-ink: #e9f3ee;
    --chud-mute: #9fb8ad;
    --chud-crimson: #c8333a;
    --chud-crimson-hi: #e85a52;
    --chud-panel: linear-gradient(180deg, rgba(22, 44, 37, 0.93), rgba(11, 25, 21, 0.93));
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    color: var(--chud-ink);
    font-family: Inter, system-ui, sans-serif;
}

.chud {
    position: absolute;
    inset: 0;
}

.chud [hidden] {
    display: none !important;
}

.chud-area {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.chud-tl {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    align-items: flex-start;
}

.chud-tc {
    top: max(8px, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
}

.chud-tr {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    align-items: flex-end;
}

.chud-bl {
    left: max(14px, env(safe-area-inset-left));
    bottom: max(16px, env(safe-area-inset-bottom));
    align-items: flex-start;
}

.chud-bc {
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
}

.chud-rt {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.chud-panel,
.chud-sys,
.chud-action,
.chud-options-tab,
.chud-drawer,
.chud-tier-arrow,
.chud-skill {
    pointer-events: auto;
}

.chud-panel {
    position: relative;
    background: var(--chud-panel);
    border: 1px solid var(--chud-gold);
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.chud-panel::before,
.chud-panel::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    border: 2px solid var(--chud-gold-hi);
    pointer-events: none;
    opacity: 0.75;
}

.chud-panel::before {
    top: 3px;
    left: 3px;
    border-right: 0;
    border-bottom: 0;
}

.chud-panel::after {
    right: 3px;
    bottom: 3px;
    border-left: 0;
    border-top: 0;
}

.chud-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 8px;
    min-width: 300px;
    max-width: 380px;
}

.chud-portrait {
    flex: 0 0 auto;
    width: 66px;
    height: 66px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--chud-gold-hi), #7a5a22);
}

.chud-portrait-window {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 50% 35%, #2c4a40, #0c1714);
}

.chud-portrait-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.chud-player-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.chud-player-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chud-player-name,
.chud-objective-title,
.chud-boss-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    color: var(--chud-gold-hi);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chud-player-name {
    font-size: 17px;
}

.chud-player-realm {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--chud-jade);
}

.chud-player-status {
    font-size: 11px;
    color: var(--chud-gold-hi);
}

.chud-lives {
    display: inline-flex;
    gap: 2px;
}

.chud-heart svg {
    width: 14px;
    height: 14px;
    fill: var(--chud-jade);
}

.chud-heart.is-lost svg {
    fill: rgba(159, 184, 173, 0.25);
}

.chud-crew-row {
    display: inline-flex;
    gap: 8px;
}

.chud-crew {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--chud-ink);
}

.chud-crew svg {
    width: 13px;
    height: 13px;
    fill: var(--chud-mute);
}

.chud-meter {
    position: relative;
    height: 15px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(201, 164, 92, 0.45);
}

.chud-meter-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(180deg, var(--chud-crimson-hi), var(--chud-crimson));
    transition: width 0.25s linear;
}

.chud-meter-text {
    position: relative;
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 13px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
}

.chud-meter--life {
    height: 5px;
    border-color: rgba(201, 164, 92, 0.3);
}

.chud-meter--life .chud-meter-fill {
    background: linear-gradient(90deg, #a77d34, var(--chud-gold-hi));
}

.chud-objective {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 260px;
    max-width: min(560px, 46vw);
    padding: 6px 18px 8px;
}

.chud-objective-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
}

.chud-objective-title {
    font-size: 18px;
}

.chud-objective-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--chud-jade);
}

.chud-tier {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--chud-ink);
    white-space: nowrap;
}

.chud-tier-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.chud-tier-arrow svg {
    width: 16px;
    height: 16px;
    fill: var(--chud-gold-hi);
}

.chud-tier-arrow:hover:not(.is-disabled) {
    background: rgba(95, 212, 168, 0.16);
}

.chud-tier-arrow.is-disabled svg {
    fill: rgba(159, 184, 173, 0.3);
}

.chud-timer,
.chud-countdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 4px;
    border-radius: 50%;
    border: 1px solid var(--chud-gold);
    background: rgba(0, 0, 0, 0.4);
    font-size: 12px;
    font-weight: 700;
    color: var(--chud-ink);
    box-sizing: border-box;
}

.chud-pips {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.chud-pips--dense {
    gap: 4px;
}

.chud-pip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid rgba(159, 184, 173, 0.6);
    background: rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.chud-pips--dense .chud-pip {
    width: 10px;
    height: 10px;
}

.chud-pip.is-done {
    background: var(--chud-jade);
    border-color: var(--chud-jade);
}

.chud-pip.is-current {
    background: radial-gradient(circle, #bff5df 0 35%, var(--chud-jade) 36%);
    border-color: #bff5df;
    box-shadow: 0 0 8px rgba(95, 212, 168, 0.85);
}

.chud-pip--boss {
    width: 20px;
    height: 20px;
    border-color: var(--chud-gold);
}

.chud-pip--boss svg {
    width: 12px;
    height: 12px;
    fill: var(--chud-gold);
}

.chud-pip--boss.is-current {
    background: rgba(201, 164, 92, 0.25);
    box-shadow: 0 0 10px rgba(240, 216, 152, 0.85);
}

.chud-pip--boss.is-current svg {
    fill: var(--chud-gold-hi);
}

.chud-drops {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding-top: 3px;
    border-top: 1px solid rgba(201, 164, 92, 0.3);
}

.chud-drop {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}

.chud-drop + .chud-drop {
    border-left: 1px solid rgba(201, 164, 92, 0.3);
}

.chud-drop-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
}

.chud-drop-icon > *,
.chud-drop-icon svg,
.chud-drop-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.chud-boss {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: min(540px, 46vw);
    padding: 5px 14px 8px;
}

.chud-boss-name {
    font-size: 16px;
}

.chud-boss-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.chud-boss-row .chud-meter {
    flex: 1 1 auto;
    height: 17px;
}

.chud-boss-row .chud-meter-text {
    line-height: 15px;
}

.chud-system {
    display: flex;
    gap: 6px;
}

.chud-sys {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 58px;
    height: 58px;
    padding: 0;
    border: 1px solid var(--chud-gold);
    border-radius: 7px;
    background: var(--chud-panel);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.4);
    color: var(--chud-ink);
    cursor: pointer;
}

.chud-sys svg {
    width: 22px;
    height: 22px;
    fill: var(--chud-gold-hi);
}

.chud-sys-label {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    max-width: 54px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chud-sys:hover,
.chud-sys:focus-visible {
    border-color: var(--chud-gold-hi);
    outline: none;
}

.chud-sys.is-on {
    border-color: var(--chud-jade);
    box-shadow: inset 0 0 12px rgba(95, 212, 168, 0.3), 0 0 10px rgba(95, 212, 168, 0.45);
}

.chud-sys.is-on svg {
    fill: var(--chud-jade);
}

.chud-sys.is-on .chud-sys-label {
    color: var(--chud-jade);
}

.chud-sys--exit svg {
    fill: #e46b5e;
}

.chud-sys.world-routine-running {
    border-color: var(--chud-jade);
}

.chud-sys.world-routine-running svg {
    fill: var(--chud-jade);
}

.chud-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
}

.chud-skills {
    display: flex;
    gap: 7px;
}

.chud-skill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 6px;
    border: 1px solid var(--chud-gold);
    background: radial-gradient(circle at 50% 40%, #2b4a3f, #102019);
    overflow: hidden;
}

.chud-skill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(rgba(0, 0, 0, 0.62) var(--sweep, 0%), transparent 0);
    pointer-events: none;
}

.chud-skill-sigil {
    display: inline-flex;
    width: 28px;
    height: 28px;
}

.chud-skill-sigil svg {
    width: 100%;
    height: 100%;
}

.chud-skill-badge {
    position: absolute;
    right: 2px;
    bottom: 1px;
    z-index: 1;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px #000;
}

.chud-skill.is-active {
    border-color: var(--chud-jade);
    box-shadow: 0 0 10px rgba(95, 212, 168, 0.6);
}

.chud-skill.is-empty {
    filter: grayscale(1);
    opacity: 0.45;
}

.chud-bar-action {
    display: flex;
    padding-left: 10px;
    border-left: 1px solid rgba(201, 164, 92, 0.35);
}

.chud-skills[hidden] + .chud-bar-action {
    padding-left: 0;
    border-left: 0;
}

.chud-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    height: 46px;
    padding: 0 16px;
    border-radius: 6px;
    border: 1px solid rgba(201, 164, 92, 0.5);
    background: rgba(0, 0, 0, 0.35);
    color: var(--chud-mute);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.chud-action-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.chud-action.is-ready {
    color: #dffaf0;
    border-color: var(--chud-jade);
    background: linear-gradient(180deg, rgba(47, 125, 100, 0.55), rgba(16, 52, 41, 0.75));
    box-shadow: 0 0 12px rgba(95, 212, 168, 0.45);
}

.chud-action:disabled {
    cursor: default;
    opacity: 0.7;
}

.chud-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 3px;
    border: 1px solid var(--chud-gold);
    background: #f3e6c2;
    color: #2a2112;
    font-size: 11px;
    font-weight: 800;
    box-sizing: border-box;
}

.chud-action .chud-key {
    position: absolute;
    top: -8px;
    right: -6px;
}

.chud-loot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 280px;
}

.chud-loot-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
    opacity: calc(1 - var(--age, 0) * 0.18);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chud-loot-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

.chud-loot-icon svg,
.chud-loot-icon img {
    width: 100%;
    height: 100%;
}

.chud-options-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 52px;
    border: 1px solid var(--chud-gold);
    border-right: 0;
    border-radius: 7px 0 0 7px;
    background: var(--chud-panel);
    cursor: pointer;
}

.chud-options-tab svg {
    width: 20px;
    height: 20px;
    fill: var(--chud-gold-hi);
}

.chud-drawer {
    position: absolute;
    top: 92px;
    right: max(10px, env(safe-area-inset-right));
    bottom: 96px;
    width: min(380px, 42vw);
    display: none;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.chud-options-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px 16px;
    border-bottom: 1px solid rgba(201, 164, 92, 0.35);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--chud-gold-hi);
}

.chud-options-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    cursor: pointer;
}

.chud-options-close svg {
    width: 18px;
    height: 18px;
    fill: var(--chud-gold-hi);
}

.chud-options-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chud-options-body .exp-ctrl-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.chud-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 5px;
    border: 1px solid var(--chud-gold);
    background: var(--chud-panel);
    font-size: 13px;
    font-weight: 700;
    color: var(--chud-ink);
}

@media (prefers-reduced-motion: reduce) {
    .chud-meter-fill {
        transition: none;
    }
}

@media (max-width: 900px) {
    .chud-player {
        min-width: 240px;
    }

    .chud-sys {
        width: 48px;
        height: 48px;
    }

    .chud-sys-label {
        font-size: 9px;
    }

    .chud-objective {
        min-width: 200px;
        max-width: 40vw;
    }
}

.chud-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chud-action-extras {
    display: flex;
    gap: 6px;
}

.chud-action--small {
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
}

.chud-action--small .chud-action-icon svg {
    width: 18px;
    height: 18px;
}

.chud-host.is-options-open .chud-drawer,
.chud-host.is-options-open .chud-sheet {
    display: flex;
}

.chud-boss--versus {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.chud-versus {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.chud-versus-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.chud-versus-side .chud-meter {
    width: 100%;
}

.chud-versus-name--ally {
    color: var(--chud-jade);
}

.chud-meter--ally .chud-meter-fill {
    background: linear-gradient(180deg, #6fe0b6, var(--chud-jade-dim));
}

.chud-options-body .exploration-quick-controls,
.chud-options-body .exploration-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chud-options-body .exploration-quick-controls:empty,
.chud-options-body .exploration-controls:empty {
    display: none;
}

.chud-options-body .exploration-quick-controls + .exploration-controls:not(:empty) {
    padding-top: 10px;
    border-top: 1px solid rgba(201, 164, 92, 0.3);
}

.chud-options-body .exp-ctrl-label {
    flex: 1 0 100%;
    font-size: 12px;
    font-weight: 700;
    color: var(--chud-mute);
}

.chud-options-body .combat-quick-navigation {
    display: flex;
    gap: 6px;
}

.chud-options-body .combat-quick-navigation .sect-btn {
    flex: 1 1 0;
}

.chud-options-body input[type="number"] {
    width: 96px;
}

.chud-options-body .exploration-vital-row {
    display: none;
}

.chud-player-res {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 12px;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 700;
    color: var(--chud-ink);
}

.chud-res {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.chud-res-icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
}

.chud-res-icon svg {
    width: 100%;
    height: 100%;
}

.chud-res--lifespan .chud-res-icon svg {
    fill: var(--chud-gold-hi);
}

.chud-res--lifespan .chud-res-value {
    color: var(--chud-gold-hi);
}
