#portal-hud {
    position: fixed;
    z-index: 6;
    bottom: 47px;
    right: 10px;
    color: #f3fff7;
    background: #152b23f2;
    border: 1px solid #5d8a75;
    border-radius: 8px;
    font: 13px system-ui, sans-serif;
    max-width: min(250px, calc(100vw - 20px));
}
#portal-hud summary { padding: 7px 11px; cursor: pointer; }
#portal-hud ol { margin: 0 8px 8px; padding-left: 19px; max-height: 122px; overflow: auto; }
#portal-hud li { padding-block: 1px; }
#portal-hud summary:focus-visible { outline: 2px solid #afebbd; outline-offset: 2px; }
#portal-hud[open] { width: min(250px, calc(100vw - 22px)); }
#corner-minimap {
    position: fixed;
    inset: max(.52vw, .93vh) max(.52vw, .93vh) auto auto;
    width: max(10.42vw, 18.52vh);
    height: auto;
    z-index: 5;
    pointer-events: none;
    background: #0d1b16;
    border: 1px solid #5d8a75;
    border-radius: 5px;
}
#corner-minimap[hidden] { display: none; }

#region-map {
    position: fixed;
    inset: 0;
    z-index: 7;
    height: fit-content;
    pointer-events: none;
    margin: auto;
    width: min(544px, calc(100vw - 48px), calc(100dvh - 125px));
    padding: 12px 14px;
    border: 1px solid #5d8a75;
    border-radius: 12px;
    color: #f3fff7;
    background: #152b23;
    font: 14px system-ui, sans-serif;
}
#region-map header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#region-map h2 { margin: 0; font-size: 18px; }
#region-map button { pointer-events: auto; border: 0; border-radius: 5px; padding: 2px 9px; font-size: 22px; cursor: pointer; }
#region-map canvas { position: static; width: 100%; height: auto; display: block; border-radius: 6px; background: #0d1b16; }
#region-map footer { margin-top: 7px; }
#region-map .spawn-rarity-chip { display: inline-block; margin: 3px 7px 0 0; white-space: nowrap; }
#region-map .spawn-rarity-chip::before { content: ''; display: inline-block; width: .72em; height: .72em; margin-right: .25em; background: var(--rarity); }

#spawn-map-hover { position: absolute; bottom: 100%; left: 0; padding: 5px 9px; border-radius: 5px; background: #152b23; }

#afk-check {
    position: fixed;
    z-index: 8;
    width: min(300px, calc(100vw - 24px));
    padding: 12px 15px;
    border: 1px solid #93c5b0;
    border-radius: 12px;
    background: #122b23f5;
    color: #f3fff8;
    font: 600 14px system-ui, sans-serif;
    box-shadow: 0 4px 16px #0005;
}

#afk-check input {
    display: block;
    width: 100%;
    margin: 8px 0 4px;
    accent-color: #56c8a3;
    cursor: grab;
    touch-action: none;
}

#afk-check input:active { cursor: grabbing; }
#afk-check output { color: #c2e4d7; font-variant-numeric: tabular-nums; }

#rebirth-dialog {
    width: min(28rem, calc(100vw - 2rem));
    box-sizing: border-box;
    padding: 1.25rem;
    border: 2px solid #6b9b84;
    border-radius: 0.75rem;
    background: #142b23;
    color: #f3fff8;
    font: 600 1rem/1.5 system-ui, sans-serif;
}
#rebirth-dialog::backdrop { background: #0008; }
#rebirth-dialog h2 { margin: 0; font-size: 1.35rem; }
#rebirth-dialog div { display: flex; gap: 0.6rem; justify-content: flex-end; }
#rebirth-dialog button {
    padding: 0.5rem 0.75rem;
    border: 1px solid #6b9b84;
    border-radius: 0.4rem;
    background: #29483a;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
#rebirth-dialog button:last-child { background: #e2ca69; color: #172820; }
