/* Realm of Echoes reusable gameplay HUD primitives.
 * Material classes stay behavior-free; feature selectors compose them below.
 */

.roe-hud-frame {
    position: relative;
    isolation: isolate;
    overflow: visible;
    border: 1px solid var(--roe-hud-frame-edge);
    border-top-color: var(--roe-hud-frame-highlight);
    border-radius: var(--roe-radius-sm);
    color: var(--roe-hud-text);
    background: url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") center / cover no-repeat var(--roe-hud-frame-surface);
    background: image-set(url("./ui/materials/charred-oak-grain.avif?v=2026-07-27-avif-1") type("image/avif"), url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") type("image/webp")) center / cover no-repeat var(--roe-hud-frame-surface);
    box-shadow: var(--roe-shadow-hud-frame);
}

.roe-hud-frame::before,
.roe-hud-frame::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.roe-hud-frame::before {
    z-index: 2;
    inset: var(--roe-space-1);
    border: 1px solid color-mix(in srgb, var(--roe-hud-frame-highlight) 34%, transparent);
    border-radius: var(--roe-radius-xs);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--roe-black-iron) 72%, transparent) inset;
}

.roe-hud-frame::after {
    z-index: 3;
    inset: var(--roe-space-1);
    border: 1px solid color-mix(in srgb, var(--roe-black-iron) 72%, transparent);
    border-radius: inherit;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--roe-hud-frame-highlight) 16%, transparent) inset;
}

.roe-hud-frame > :not(.sr-only) {
    position: relative;
    z-index: 1;
}

.roe-hud-rail {
    min-height: 52px;
    display: flex;
    align-items: stretch;
    gap: var(--roe-space-1);
    padding: 0 var(--roe-space-2) 0 var(--roe-space-2);
    border-bottom: 1px solid var(--roe-hud-frame-edge);
    background: url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") center / cover no-repeat var(--roe-hud-frame-surface);
    background: image-set(url("./ui/materials/charred-oak-grain.avif?v=2026-07-27-avif-1") type("image/avif"), url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") type("image/webp")) center / cover no-repeat var(--roe-hud-frame-surface);
}

.roe-hud-rail-grip {
    position: relative;
    flex: 1 1 36px;
    min-width: 28px;
    min-height: 52px;
    border-top: 1px solid color-mix(in srgb, var(--roe-hud-frame-highlight) 36%, transparent);
}

.roe-hud-rail-grip::after {
    content: '';
    position: absolute;
    top: var(--roe-space-3);
    right: 0;
    width: var(--roe-space-2);
    height: var(--roe-space-2);
    border: 1px solid var(--roe-hud-frame-edge);
    border-radius: 50%;
    background: var(--roe-black-iron);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--roe-hud-frame-highlight) 24%, transparent) inset;
}

.roe-hud-tablist {
    min-width: 0;
    display: flex;
    align-items: flex-end;
    gap: var(--roe-space-1);
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    touch-action: pan-x;
}

.roe-hud-tablist::-webkit-scrollbar {
    display: none;
}

.roe-hud-tab {
    position: relative;
    flex: 0 1 104px;
    min-width: 64px;
    height: 52px;
    margin-top: 0;
    padding: var(--roe-space-2) var(--roe-space-3) var(--roe-space-1);
    border: 1px solid var(--roe-hud-frame-edge);
    border-bottom-color: var(--roe-black-iron);
    border-radius: var(--roe-radius-xs) var(--roe-radius-xs) 0 0;
    color: var(--roe-hud-text-muted);
    background: url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") center / cover no-repeat var(--roe-hud-frame-surface);
    background: image-set(url("./ui/materials/charred-oak-grain.avif?v=2026-07-27-avif-1") type("image/avif"), url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") type("image/webp")) center / cover no-repeat var(--roe-hud-frame-surface);
    box-shadow:
        0 1px 0 color-mix(in srgb, var(--roe-hud-frame-highlight) 24%, transparent) inset,
        0 0 0 2px color-mix(in srgb, var(--roe-black-iron) 68%, transparent) inset;
    font: 700 var(--roe-font-size-label)/1 var(--roe-display);
    letter-spacing: 0.35px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px var(--roe-black-iron);
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out), transform var(--roe-motion-fast) var(--roe-ease-out);
}

.roe-hud-tab:hover {
    color: var(--roe-moonbone);
    border-top-color: var(--roe-hud-frame-highlight);
}

.roe-hud-tab:active {
    transform: scale(0.97);
}

.roe-hud-tab:focus-visible {
    z-index: 2;
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: -3px;
    color: var(--roe-moonbone);
}

.roe-hud-tab[aria-selected='true'] {
    color: color-mix(in srgb, var(--roe-moonbone) 82%, var(--roe-ancient-gold));
    border-color: var(--roe-hud-frame-highlight);
    border-bottom-color: var(--roe-hud-frame-surface);
    background: url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") center / cover no-repeat color-mix(in srgb, var(--roe-charred-oak) 78%, var(--roe-aged-bronze));
    background: image-set(url("./ui/materials/charred-oak-grain.avif?v=2026-07-27-avif-1") type("image/avif"), url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") type("image/webp")) center / cover no-repeat color-mix(in srgb, var(--roe-charred-oak) 78%, var(--roe-aged-bronze));
    box-shadow:
        0 1px 0 color-mix(in srgb, var(--roe-moonbone) 18%, transparent) inset,
        0 0 0 2px color-mix(in srgb, var(--roe-black-iron) 58%, transparent) inset,
        0 -2px 0 color-mix(in srgb, var(--roe-hud-frame-highlight) 32%, transparent) inset;
}

.roe-hud-tab[hidden] {
    display: none;
}

.roe-hud-well {
    border-top: 1px solid var(--roe-black-iron);
    border-bottom: 1px solid var(--roe-hud-frame-edge);
    background: var(--roe-hud-well-surface);
    box-shadow: var(--roe-shadow-hud-inset);
}

.roe-hud-field {
    min-width: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: var(--roe-space-2);
    overflow: hidden;
    border: 1px solid var(--roe-hud-frame-edge);
    border-top-color: var(--roe-hud-frame-highlight);
    border-radius: var(--roe-radius-xs);
    color: var(--roe-hud-field-ink);
    background: url("./ui/materials/aged-parchment-grain.webp?v=2026-07-27-avif-1") center / cover no-repeat var(--roe-hud-field-surface);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--roe-black-iron) 64%, transparent) inset,
        0 2px 6px color-mix(in srgb, var(--roe-black-iron) 32%, transparent) inset;
}

.roe-hud-field:focus-within {
    border-color: var(--roe-hud-focus);
    box-shadow: var(--roe-focus-ring);
}

.roe-hud-action {
    min-width: 92px;
    min-height: 52px;
    display: inline-grid;
    place-items: center;
    padding: 0 var(--roe-space-4);
    border: 1px solid color-mix(in srgb, var(--roe-hud-action-active) 76%, var(--roe-black-iron));
    border-radius: var(--roe-radius-xs);
    color: var(--roe-moonbone);
    background: var(--roe-hud-action-surface);
    box-shadow:
        0 1px 0 color-mix(in srgb, var(--roe-moonbone) 18%, transparent) inset,
        0 0 0 2px color-mix(in srgb, var(--roe-black-iron) 54%, transparent) inset,
        0 2px 4px color-mix(in srgb, var(--roe-black-iron) 56%, transparent);
    font: 700 var(--roe-font-size-label)/1 var(--roe-display);
    letter-spacing: 0.45px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px var(--roe-black-iron);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out), transform var(--roe-motion-fast) var(--roe-ease-out);
}

.roe-hud-action:not(:disabled):hover {
    color: var(--roe-moonbone);
    background: color-mix(in srgb, var(--roe-hud-action-surface) 78%, var(--roe-hud-action-active));
}

.roe-hud-action:not(:disabled):active {
    transform: scale(0.97);
}

.roe-hud-action:focus-visible {
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: 2px;
}

.roe-hud-action:disabled {
    color: color-mix(in srgb, var(--roe-hud-text-muted) 72%, var(--roe-black-iron));
    border-color: color-mix(in srgb, var(--roe-hud-frame-edge) 54%, var(--roe-black-iron));
    background: color-mix(in srgb, var(--roe-hud-action-surface) 30%, var(--roe-black-iron));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--roe-black-iron) 62%, transparent) inset;
    opacity: 0.76;
    cursor: not-allowed;
}

/* Chat window: first consumer of the reusable HUD primitives. */

#chatBox.roe-chat-window {
    position: absolute;
    left: 28px;
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px));
    width: min(420px, calc(100% - 56px));
    max-height: calc(100vh - 64px - env(safe-area-inset-top));
    padding: 0;
}

#chatBox.roe-chat-window:not(.hidden) {
    animation: chat-window-reveal var(--roe-motion-fast) var(--roe-ease-out) both;
}

#chatBox.roe-chat-window.is-dragging {
    opacity: 0.92;
}

#chatBox.roe-chat-window.draggable-window {
    max-width: calc(100% - 12px);
}

.chat-header {
    user-select: none;
}

.chat-filter-tabs {
    flex: 0 1 auto;
}

.roe-hud-chat-log:focus-visible {
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: -2px;
}

#chatMessages {
    position: relative;
    scroll-behavior: smooth;
}

.roe-hud-chat-log:empty {
    place-content: center;
    text-align: center;
}

.roe-hud-chat-log:empty::before {
    content: 'No echoes yet  ·  Press Enter to chat';
    color: var(--roe-hud-text-muted);
    font: italic var(--roe-font-size-label)/1.3 var(--roe-display);
    letter-spacing: 0.15px;
}

.roe-hud-chat-log ::selection {
    color: var(--roe-moonbone);
    background: color-mix(in srgb, var(--roe-hud-focus) 34%, var(--roe-black-iron));
}

.chat-message {
    --chat-author-color: var(--roe-chat-party);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, auto) minmax(0, 1fr);
    align-items: baseline;
    gap: var(--roe-space-2);
    min-width: 0;
    padding: var(--roe-space-1) var(--roe-space-2);
    border-radius: var(--roe-radius-xs);
    background: transparent;
    color: var(--roe-hud-text);
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out);
    user-select: text;
}

.chat-message:hover {
    background: color-mix(in srgb, var(--roe-hud-frame-highlight) 7%, transparent);
}

.chat-message-pending {
    opacity: 0.56;
}

.chat-message-pending .chat-message-text::after {
    content: '  ·  sending';
    color: var(--roe-hud-text-muted);
    font-size: var(--roe-font-size-caption);
}

.chat-message-failed {
    opacity: 0.78;
}

.chat-message-failed .chat-message-text::after {
    content: '  ·  not confirmed';
    color: var(--roe-chat-failure);
    font-size: var(--roe-font-size-caption);
}

.chat-message-confirmed::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: color-mix(in srgb, var(--roe-hud-focus) 10%, transparent);
    opacity: 0;
    animation: chat-message-confirmed var(--roe-motion-standard) var(--roe-ease-out) both;
}

.player-name {
    max-width: 140px;
    overflow: hidden;
    color: var(--chat-author-color);
    font: 700 var(--roe-font-size-label)/1.25 var(--roe-ui);
    text-overflow: ellipsis;
    white-space: nowrap;
}

button.player-name {
    min-width: 0;
    padding: 0;
    border: 0;
    color: var(--chat-author-color);
    background: transparent;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
}

button.player-name:hover {
    color: var(--roe-moonbone);
    text-decoration: underline;
}

button.player-name:focus-visible,
button.chat-channel-tag:focus-visible {
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: 2px;
}

button.chat-channel-tag {
    cursor: pointer;
    touch-action: manipulation;
}

button.chat-channel-tag:hover {
    border-color: color-mix(in srgb, var(--chat-author-color) 76%, transparent);
    filter: brightness(1.18);
}

.chat-channel-tag {
    padding: 0 var(--roe-space-1);
    border: 1px solid color-mix(in srgb, var(--chat-author-color) 44%, transparent);
    border-radius: var(--roe-radius-xs);
    color: var(--chat-author-color);
    background: color-mix(in srgb, var(--chat-author-color) 10%, transparent);
    font: 800 var(--roe-font-size-caption)/1 var(--roe-ui);
    letter-spacing: 0.25px;
    text-transform: uppercase;
}

.chat-channel-tag:empty {
    display: none;
}

.player-name::after {
    content: ':';
    color: currentColor;
}

.chat-message-text {
    min-width: 0;
    color: color-mix(in srgb, var(--roe-hud-text) 90%, var(--roe-hud-text-muted));
    font: var(--roe-font-size-body)/1.35 var(--roe-ui);
    overflow-wrap: anywhere;
    text-wrap: pretty;
    user-select: text;
}

.chat-message-system {
    --chat-author-color: var(--roe-chat-system);
}

.chat-message-system .chat-message-text {
    color: color-mix(in srgb, var(--roe-chat-system) 74%, var(--roe-hud-text));
    font-style: italic;
}

.chat-composer {
    position: relative;
}

#chatBox:not([data-chat-connection-state='online']) .chat-composer {
    opacity: 0.76;
}

.chat-entry {
    min-width: 0;
}

.chat-whisper-target {
    flex: 0 0 auto;
    max-width: 140px;
    overflow: hidden;
    margin-left: var(--roe-space-2);
    padding: var(--roe-space-1) var(--roe-space-2);
    border: 1px solid color-mix(in srgb, var(--roe-chat-whisper) 58%, var(--roe-parchment-ink));
    border-radius: var(--roe-radius-round);
    color: color-mix(in srgb, var(--roe-chat-whisper) 60%, var(--roe-parchment-ink));
    background: color-mix(in srgb, var(--roe-chat-whisper) 18%, transparent);
    font: 800 var(--roe-font-size-caption)/1 var(--roe-ui);
    letter-spacing: 0.25px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-composer.is-whispering .roe-hud-field {
    border-color: color-mix(in srgb, var(--roe-chat-whisper) 72%, var(--roe-hud-frame-edge));
}

#chatInput {
    min-width: 0;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    color: var(--roe-hud-field-ink);
    caret-color: var(--roe-hud-field-ink);
    background: transparent;
    box-shadow: none;
    font: var(--roe-font-size-body)/1.3 var(--roe-ui);
}

#chatInput:focus-visible {
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: -2px;
}

#chatInput::placeholder {
    color: color-mix(in srgb, var(--roe-hud-field-ink) 70%, transparent);
    opacity: 1;
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out);
}

#chatInput:disabled {
    color: color-mix(in srgb, var(--roe-hud-field-ink) 62%, transparent);
    cursor: not-allowed;
}

@keyframes chat-window-reveal {
    from { opacity: 0; transform: translateY(var(--roe-space-2)); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes chat-message-confirmed {
    0%, 100% { opacity: 0; }
    45% { opacity: 1; }
}

#ui:is(
    [data-ui-scale='95'],
    [data-ui-scale='100'],
    [data-ui-scale='105'],
    [data-ui-scale='110'],
    [data-ui-scale='115'],
    [data-ui-scale='120']
) #chatBox.roe-chat-window {
    bottom: max(132px, calc(env(safe-area-inset-bottom) + 124px));
    max-height: calc(100vh - 174px - env(safe-area-inset-top));
}

@media (max-width: 1520px) {
    #chatBox.roe-chat-window {
        bottom: max(132px, calc(env(safe-area-inset-bottom) + 124px));
        max-height: calc(100vh - 174px - env(safe-area-inset-top));
    }
}

@media (max-width: 740px) {
    #targetFrame:not(.hidden) ~ #chatBox.roe-chat-window {
        bottom: max(320px, calc(env(safe-area-inset-bottom) + 312px));
        max-height: calc(100vh - 340px - env(safe-area-inset-top));
    }

    #ui:is(
        [data-ui-scale='105'],
        [data-ui-scale='110'],
        [data-ui-scale='115'],
        [data-ui-scale='120']
    ) #targetFrame:not(.hidden) ~ #chatBox.roe-chat-window {
        bottom: max(300px, calc(env(safe-area-inset-bottom) + 292px));
    }

    #ui:is(
        [data-ui-scale='105'],
        [data-ui-scale='110'],
        [data-ui-scale='115'],
        [data-ui-scale='120']
    ) #targetFrame:not(.hidden) ~ #chatBox #chatMessages {
        height: 52px;
    }
}

@media (max-width: 640px) {
    #chatBox.roe-chat-window {
        left: 10px;
        width: calc(100% - 20px);
    }

    .roe-hud-rail {
        padding-inline: var(--roe-space-1);
    }

    .roe-hud-rail-grip {
        min-width: 24px;
    }

    .roe-hud-tab {
        min-width: 56px;
        padding-inline: var(--roe-space-2);
        font-size: var(--roe-font-size-caption);
    }

    #chatInput {
        font-size: var(--roe-font-size-body-large);
    }

    .chat-composer {
        padding-inline: var(--roe-space-2);
    }
}

html.reduce-motion #chatBox,
html.reduce-motion #chatBox *,
html.reduce-motion #chatBox *::before,
html.reduce-motion #chatBox *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
}

html.reduce-motion #chatMessages {
    scroll-behavior: auto;
}

@media (prefers-reduced-motion: reduce) {
    #chatBox,
    #chatBox *,
    #chatBox *::before,
    #chatBox *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    #chatMessages {
        scroll-behavior: auto;
    }
}

/* Reference-faithful reusable HUD component library.
 * These contracts are behavior-free and intentionally use only .roe-hud-* selectors.
 */

.roe-hud-titlebar {
    position: relative;
    min-width: 0;
    min-height: var(--roe-hud-title-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--roe-space-7);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--roe-hud-title-active) 58%, var(--roe-black-iron));
    border-bottom-color: var(--roe-black-iron);
    border-radius: var(--roe-radius-xs) var(--roe-radius-xs) 0 0;
    color: var(--roe-moonbone);
    background: color-mix(in srgb, var(--roe-hud-title-active) 76%, var(--roe-hud-title-surface));
    box-shadow:
        0 1px 0 color-mix(in srgb, var(--roe-moonbone) 14%, transparent) inset,
        0 -3px 8px color-mix(in srgb, var(--roe-black-iron) 58%, transparent) inset,
        0 2px 5px color-mix(in srgb, var(--roe-black-iron) 68%, transparent);
}

.roe-hud-titlebar::before,
.roe-hud-titlebar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32%;
    pointer-events: none;
    width: 2px;
    background: color-mix(in srgb, var(--roe-moonbone) 12%, transparent);
    transform: skewX(-28deg);
}

.roe-hud-titlebar::before { left: 0; }
.roe-hud-titlebar::after { right: 0; transform: skewX(28deg); }

.roe-hud-titlebar > :is(h2, h3, h4, span) {
    position: relative;
    z-index: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font: 700 var(--roe-font-size-body-large)/1 var(--roe-display);
    letter-spacing: 0.6px;
    text-align: center;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px var(--roe-black-iron);
    text-transform: uppercase;
    white-space: nowrap;
}

.roe-hud-close {
    position: absolute;
    z-index: 8;
    top: -12px;
    right: -12px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid var(--roe-black-iron);
    border-radius: 50%;
    color: var(--roe-warning-red-bright);
    background: var(--roe-charred-oak-deep);
    box-shadow:
        0 0 0 2px var(--roe-aged-bronze),
        0 0 0 3px var(--roe-black-iron),
        0 2px 5px color-mix(in srgb, var(--roe-black-iron) 72%, transparent),
        0 1px 0 color-mix(in srgb, var(--roe-moonbone) 12%, transparent) inset;
    font: 900 25px/1 var(--roe-ui);
    text-shadow: 0 1px 2px var(--roe-black-iron);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out), transform var(--roe-motion-fast) var(--roe-ease-out);
}

.roe-hud-frame > .roe-hud-close {
    position: absolute;
    z-index: 8;
}

.roe-hud-close:hover { color: color-mix(in srgb, var(--roe-warning-red-bright) 76%, var(--roe-moonbone)); }
.roe-hud-close:active { transform: scale(0.97); }
.roe-hud-close:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 4px; }

.roe-hud-parchment {
    min-width: 0;
    color: var(--roe-parchment-ink);
    background: url("./ui/materials/aged-parchment-grain.webp?v=2026-07-27-avif-1") center / cover no-repeat var(--roe-aged-parchment);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--roe-black-iron) 72%, transparent) inset,
        0 2px 11px color-mix(in srgb, var(--roe-black-iron) 24%, transparent) inset;
}

.roe-hud-footer {
    min-height: var(--roe-hud-footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--roe-space-3);
    padding: var(--roe-space-2) var(--roe-space-4);
    border-top: 1px solid var(--roe-hud-frame-edge);
    color: color-mix(in srgb, var(--roe-moonbone) 72%, var(--roe-aged-bronze-bright));
    background: url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") center / cover no-repeat var(--roe-hud-footer-surface);
    background: image-set(url("./ui/materials/charred-oak-grain.avif?v=2026-07-27-avif-1") type("image/avif"), url("./ui/materials/charred-oak-grain.webp?v=2026-07-27-avif-1") type("image/webp")) center / cover no-repeat var(--roe-hud-footer-surface);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--roe-black-iron) 64%, transparent) inset;
    font: 700 var(--roe-font-size-label)/1.2 var(--roe-display);
    font-variant-numeric: tabular-nums;
}

.roe-hud-button {
    --roe-hud-button-surface: var(--roe-hud-neutral-action);
    --roe-hud-button-active: var(--roe-hud-neutral-action-active);
    min-width: 112px;
    min-height: 44px;
    display: inline-grid;
    place-items: center;
    padding: 0 var(--roe-space-4);
    border: 1px solid color-mix(in srgb, var(--roe-hud-button-active) 74%, var(--roe-black-iron));
    border-radius: var(--roe-radius-xs);
    color: var(--roe-moonbone);
    background: var(--roe-hud-button-surface);
    box-shadow:
        0 1px 0 color-mix(in srgb, var(--roe-moonbone) 20%, transparent) inset,
        0 0 0 2px color-mix(in srgb, var(--roe-black-iron) 58%, transparent) inset,
        0 2px 4px color-mix(in srgb, var(--roe-black-iron) 58%, transparent);
    font: 700 var(--roe-font-size-label)/1 var(--roe-display);
    letter-spacing: 0.45px;
    text-shadow: 0 1px 2px var(--roe-black-iron);
    text-transform: uppercase;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out), transform var(--roe-motion-fast) var(--roe-ease-out);
}

.roe-hud-button[data-tone='affirmative'] {
    --roe-hud-button-surface: var(--roe-signal-jade);
    --roe-hud-button-active: var(--roe-signal-jade-bright);
}

.roe-hud-button[data-tone='danger'] {
    --roe-hud-button-surface: var(--roe-hud-danger);
    --roe-hud-button-active: var(--roe-hud-danger-active);
}

.roe-hud-button:not(:disabled):hover {
    background: color-mix(in srgb, var(--roe-hud-button-surface) 74%, var(--roe-hud-button-active));
}

.roe-hud-button:not(:disabled):active { transform: scale(0.97); }
.roe-hud-button:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 3px; }

.roe-hud-button:disabled {
    color: color-mix(in srgb, var(--roe-hud-text-muted) 72%, var(--roe-black-iron));
    border-color: color-mix(in srgb, var(--roe-hud-frame-edge) 50%, var(--roe-black-iron));
    background: color-mix(in srgb, var(--roe-hud-button-surface) 30%, var(--roe-black-iron));
    opacity: 0.74;
    cursor: not-allowed;
}

.roe-hud-slot {
    position: relative;
    width: var(--roe-hud-slot-size);
    height: var(--roe-hud-slot-size);
    display: grid;
    place-items: center;
    padding: var(--roe-space-1);
    overflow: hidden;
    border: 1px solid var(--roe-hud-slot-edge);
    border-radius: var(--roe-radius-xs);
    color: var(--roe-hud-text-muted);
    background: var(--roe-hud-slot-surface);
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--roe-black-iron) 72%, transparent) inset,
        0 2px 9px color-mix(in srgb, var(--roe-black-iron) 66%, transparent) inset,
        0 1px 0 color-mix(in srgb, var(--roe-moonbone) 8%, transparent);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out), transform var(--roe-motion-fast) var(--roe-ease-out);
}

.roe-responsive-picture {
    display: contents;
}

.roe-hud-slot > img,
.roe-hud-slot > picture > img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 1px;
    object-fit: cover;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--roe-black-iron) 42%, transparent) inset;
}

.roe-hud-slot[data-state='empty'] {
    border-style: dashed;
    color: color-mix(in srgb, var(--roe-hud-text-muted) 54%, var(--roe-black-iron));
    background: color-mix(in srgb, var(--roe-hud-slot-surface) 54%, var(--roe-black-iron));
}

.roe-hud-slot[data-state='unavailable'] {
    filter: grayscale(1);
    opacity: 0.52;
    cursor: not-allowed;
}

.roe-hud-slot[data-state='selected'],
.roe-hud-slot[data-state='available'] {
    border-color: var(--roe-signal-jade-bright);
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--roe-signal-jade-bright) 52%, transparent) inset,
        0 0 0 1px var(--roe-black-iron),
        0 2px 9px color-mix(in srgb, var(--roe-black-iron) 64%, transparent) inset;
}

.roe-hud-slot[data-state='learned'] {
    border-color: var(--roe-ancient-gold);
}

.roe-hud-slot[data-state='locked'] {
    filter: grayscale(1);
    opacity: 0.52;
}

.roe-hud-slot[data-state='cooldown']::after {
    content: '';
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--roe-black-iron) 82%, transparent);
    transform: scaleX(var(--roe-cooldown, 0.54));
    transform-origin: left;
}

.roe-hud-slot[data-drag-state='source'] {
    border-color: var(--roe-hud-drag-source);
    opacity: 0.68;
    transform: translateY(-2px) scale(0.98);
}

.roe-hud-slot[data-drag-state='target'] {
    border-color: var(--roe-hud-drop-target);
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--roe-hud-drop-target) 52%, transparent) inset,
        0 0 0 2px var(--roe-black-iron),
        0 0 0 4px var(--roe-hud-drop-target);
}

.roe-hud-slot:is(button):not(:disabled):hover { transform: translateY(-1px); }
.roe-hud-slot:is(button):not(:disabled):active { transform: scale(0.97); }
.roe-hud-slot:is(button):focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; z-index: 2; }

.roe-hud-progress {
    position: relative;
    min-width: 0;
    height: 14px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 70%, var(--roe-black-iron));
    border-radius: var(--roe-radius-xs);
    background: var(--roe-black-iron);
    box-shadow: 0 2px 5px color-mix(in srgb, var(--roe-black-iron) 74%, transparent) inset;
}

.roe-hud-progress > span {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--roe-progress, 50%);
    background: var(--roe-progress-color, var(--roe-rift-violet));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--roe-moonbone) 8%, transparent) inset;
}

.roe-hud-progress > b {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--roe-moonbone);
    font: 800 var(--roe-font-size-caption)/1 var(--roe-ui);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px var(--roe-black-iron);
}

.roe-hud-scroll {
    scrollbar-color: var(--roe-hud-scroll-thumb) var(--roe-black-iron);
    scrollbar-width: thin;
    overscroll-behavior: contain;
}

.roe-hud-scroll::-webkit-scrollbar { width: var(--roe-space-2); height: var(--roe-space-2); }
.roe-hud-scroll::-webkit-scrollbar-track { background: var(--roe-black-iron); }
.roe-hud-scroll::-webkit-scrollbar-thumb {
    border: 2px solid var(--roe-black-iron);
    border-radius: var(--roe-radius-round);
    background: var(--roe-hud-scroll-thumb);
}

.roe-hud-list-row {
    width: 100%;
    min-height: 52px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: var(--roe-space-2);
    padding: var(--roe-space-2) var(--roe-space-3);
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 44%, var(--roe-black-iron));
    color: color-mix(in srgb, var(--roe-moonbone) 68%, var(--roe-aged-bronze-bright));
    background: color-mix(in srgb, var(--roe-charred-oak) 54%, transparent);
    font: 700 var(--roe-font-size-label)/1.2 var(--roe-display);
    text-align: left;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.roe-hud-list-row:hover,
.roe-hud-list-row[aria-selected='true'] {
    color: var(--roe-moonbone);
    background: color-mix(in srgb, var(--roe-aged-bronze) 30%, var(--roe-charred-oak));
}

.roe-hud-list-row:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: -3px; }
.roe-hud-list-row > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.roe-hud-list-row[data-state='complete'] { color: color-mix(in srgb, var(--roe-signal-jade-bright) 58%, var(--roe-moonbone)); }
.roe-hud-list-row[data-state='locked'] { opacity: 0.52; }

.roe-hud-backdrop {
    position: absolute;
    z-index: 7;
    inset: 0;
    background: color-mix(in srgb, var(--roe-black-iron) 28%, transparent);
    backdrop-filter: blur(2px);
}

.roe-hud-frame > .roe-hud-backdrop { position: absolute; }

/* Compact components */

.roe-hud-loading {
    width: 640px;
    min-height: 552px;
    max-width: 100%;
    max-height: calc(100dvh - (2 * var(--roe-space-4)));
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr);
    padding: var(--roe-space-2);
    overflow: hidden;
    text-align: left;
}

.roe-hud-loading .game-loading-body {
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-items: stretch;
    align-content: start;
    gap: var(--roe-space-3);
    padding: var(--roe-space-5);
    overflow: hidden;
}

.roe-hud-loading .game-loading-guide {
    min-height: 0;
    display: grid;
    justify-items: stretch;
    align-content: start;
    gap: var(--roe-space-3);
    overflow-y: auto;
}

.roe-hud-loading .game-loading-logo {
    width: min(292px, 72%);
    height: auto;
    justify-self: center;
}

.roe-hud-loading .game-loading-field-notes {
    width: 100%;
    padding: var(--roe-space-4);
}

.roe-hud-loading .game-loading-field-notes-header {
    display: grid;
    gap: var(--roe-space-1);
    padding-bottom: var(--roe-space-3);
    border-bottom: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 44%, transparent);
}

.roe-hud-loading .game-loading-field-notes-header > span {
    color: color-mix(in srgb, var(--roe-parchment-ink) 64%, var(--roe-aged-bronze));
    font: 800 var(--roe-font-size-caption)/1 var(--roe-ui);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.roe-hud-loading .game-loading-field-notes-header > h3 {
    margin: 0;
    color: var(--roe-parchment-ink);
    font: 700 22px/1.1 var(--roe-display);
    letter-spacing: -0.2px;
    text-wrap: balance;
}

.roe-hud-loading .game-loading-tip-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.roe-hud-loading .game-loading-tip-list > li {
    min-width: 0;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    gap: var(--roe-space-3);
    padding: var(--roe-space-3) 0;
}

.roe-hud-loading .game-loading-tip-list > li + li {
    border-top: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 28%, transparent);
}

.roe-hud-loading .game-loading-tip-number {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 72%, var(--roe-parchment-ink));
    border-radius: 50%;
    color: var(--roe-parchment-ink);
    background: color-mix(in srgb, var(--roe-aged-bronze) 14%, transparent);
    font: 800 var(--roe-font-size-caption)/1 var(--roe-ui);
    font-variant-numeric: tabular-nums;
}

.roe-hud-loading .game-loading-tip-list p {
    min-width: 0;
    display: grid;
    gap: var(--roe-space-1);
    margin: 0;
}

.roe-hud-loading .game-loading-tip-list strong {
    color: var(--roe-parchment-ink);
    font: 700 var(--roe-font-size-body)/1.2 var(--roe-display);
}

.roe-hud-loading .game-loading-tip-list p > span {
    color: color-mix(in srgb, var(--roe-parchment-ink) 76%, var(--roe-aged-bronze));
    font: var(--roe-font-size-body)/1.35 var(--roe-ui);
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.roe-hud-loading .game-loading-status {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--roe-space-3);
}

.roe-hud-loading .game-loading-entry-status {
    min-width: 0;
    display: grid;
    gap: var(--roe-space-3);
}

.roe-hud-loading .game-loading-phase {
    display: block;
    margin: 0;
    color: var(--roe-aged-bronze-bright);
    font: 800 var(--roe-font-size-caption)/1 var(--roe-ui);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.roe-hud-loading .game-loading-message {
    min-width: 0;
    min-height: 18px;
    margin: 0;
    overflow: hidden;
    color: var(--roe-hud-text-muted);
    font: var(--roe-font-size-label)/1.35 var(--roe-ui);
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roe-hud-loading .game-loading-progress {
    width: 100%;
    height: 14px;
    margin: 0;
}

.roe-hud-loading .game-loading-progress > span {
    --roe-progress-color: var(--roe-rift-blue-bright);
    border-radius: 0;
    transition: width var(--roe-motion-fast) var(--roe-ease-out);
}

.roe-hud-loading .game-loading-error {
    margin: 0;
    padding: var(--roe-space-3);
    color: var(--roe-parchment-ink);
    font: 700 var(--roe-font-size-label)/1.45 var(--roe-ui);
    text-wrap: pretty;
}

.roe-hud-loading .game-loading-reload {
    justify-self: center;
    margin: 0;
}

.roe-hud-loading.has-error .game-loading-field-notes {
    display: none;
}

.roe-hud-loading.has-error {
    min-height: 0;
}

.roe-hud-loading.has-error .game-loading-progress > span {
    --roe-progress-color: var(--roe-hud-error);
}

@media (max-width: 640px) {
    .roe-hud-loading {
        min-height: 0;
        max-height: calc(100dvh - (2 * var(--roe-space-2)));
    }

    .roe-hud-loading > .roe-hud-titlebar {
        padding-inline: var(--roe-space-4);
    }

    .roe-hud-loading .game-loading-body {
        padding: var(--roe-space-3);
    }

    .roe-hud-loading .game-loading-guide,
    .roe-hud-loading .game-loading-entry-status {
        gap: var(--roe-space-2);
    }

    .roe-hud-loading .game-loading-field-notes {
        padding: var(--roe-space-3);
    }

    .roe-hud-loading .game-loading-status {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--roe-space-1);
    }

    .roe-hud-loading .game-loading-message {
        text-align: left;
        white-space: normal;
    }
}

@media (max-height: 680px) {
    .roe-hud-loading {
        min-height: 0;
    }

    .roe-hud-loading .game-loading-body {
        gap: var(--roe-space-2);
        padding-block: var(--roe-space-3);
    }

    .roe-hud-loading .game-loading-guide,
    .roe-hud-loading .game-loading-entry-status {
        gap: var(--roe-space-2);
    }

    .roe-hud-loading .game-loading-logo {
        width: min(228px, 62%);
    }
}

.roe-hud-hint {
    width: 376px;
    height: 230px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr);
    padding: var(--roe-space-3);
}

.roe-hud-hint .roe-hud-titlebar { min-height: 44px; }
.roe-hud-hint-copy {
    min-height: 0;
    padding: var(--roe-space-4) var(--roe-space-5);
    overflow: auto;
    color: color-mix(in srgb, var(--roe-moonbone) 84%, var(--roe-aged-bronze-bright));
    font: var(--roe-font-size-body)/1.35 var(--roe-ui);
    text-wrap: pretty;
}

.roe-hud-popup {
    width: 438px;
    height: 320px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: var(--roe-space-4);
}

.roe-hud-popup-sheet {
    display: grid;
    align-content: start;
    gap: var(--roe-space-3);
    padding: var(--roe-space-6) var(--roe-space-7) var(--roe-space-4);
    overflow: auto;
}

.roe-hud-popup-sheet h2 {
    margin: 0;
    color: var(--roe-rift-blue);
    font: 700 22px/1.15 var(--roe-display);
    letter-spacing: 0.4px;
    text-align: center;
    text-wrap: balance;
    text-transform: uppercase;
}

.roe-hud-popup-sheet p {
    margin: 0;
    font: var(--roe-font-size-body)/1.25 var(--roe-ui);
    text-wrap: pretty;
}

.roe-hud-popup-actions {
    display: flex;
    justify-content: center;
    gap: var(--roe-space-3);
    padding: var(--roe-space-3) 0 var(--roe-space-1);
}

.roe-hud-feedback-backdrop {
    position: fixed;
    z-index: var(--roe-hud-modal-z, 240);
    display: grid;
    place-items: center;
    padding: var(--roe-space-4);
}

.roe-hud-feedback-backdrop.hidden {
    display: none;
}

.roe-hud-feedback {
    width: 540px;
    min-height: 600px;
    max-width: calc(100vw - (2 * var(--roe-space-4)));
    max-height: calc(100vh - (2 * var(--roe-space-4)));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding: var(--roe-space-3);
}

.roe-hud-feedback-titlebar {
    min-height: 62px;
    display: grid;
    place-content: center;
    gap: 2px;
    text-align: center;
}

.roe-hud-feedback-titlebar > span {
    color: var(--roe-aged-bronze-bright);
    font: 700 10px/1 var(--roe-ui);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.roe-hud-feedback-titlebar > h2 {
    margin: 0;
}

.roe-hud-feedback-sheet {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: var(--roe-space-3);
    padding: var(--roe-space-4) var(--roe-space-5);
    overflow: auto;
}

.roe-hud-feedback-sheet > p {
    margin: 0;
    color: var(--roe-parchment-ink);
    font: var(--roe-font-size-body)/1.35 var(--roe-ui);
    text-wrap: pretty;
}

.roe-hud-feedback-reasons {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--roe-space-2);
}

.roe-hud-feedback-reasons legend {
    width: 100%;
    margin-bottom: var(--roe-space-2);
    color: var(--roe-parchment-ink);
    font: 700 12px/1.2 var(--roe-ui);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.roe-hud-feedback-choice {
    min-height: 50px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: var(--roe-space-2);
    padding: var(--roe-space-2) var(--roe-space-3);
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 58%, var(--roe-black-iron));
    background: color-mix(in srgb, var(--roe-aged-parchment) 78%, var(--roe-charred-oak));
    color: var(--roe-parchment-ink);
    font: 600 12px/1.25 var(--roe-ui);
    cursor: pointer;
}

.roe-hud-feedback-choice:hover {
    border-color: var(--roe-aged-bronze-bright);
}

.roe-hud-feedback-choice:has(input:checked) {
    border-color: var(--roe-rift-blue);
    box-shadow: inset 0 0 0 1px var(--roe-rift-blue);
}

.roe-hud-feedback-choice:has(input:focus-visible) {
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: 2px;
}

.roe-hud-feedback-choice input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--roe-rift-blue);
}

.roe-hud-feedback-comment {
    display: grid;
    gap: var(--roe-space-1);
    color: var(--roe-parchment-ink);
    font: 700 12px/1.2 var(--roe-ui);
}

.roe-hud-feedback-comment > span small {
    font-weight: 400;
}

.roe-hud-feedback-comment textarea {
    width: 100%;
    min-height: 70px;
    resize: vertical;
    padding: var(--roe-space-2) var(--roe-space-3);
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 58%, var(--roe-black-iron));
    background: color-mix(in srgb, var(--roe-aged-parchment) 86%, var(--roe-charred-oak));
    color: var(--roe-parchment-ink);
    font: var(--roe-font-size-body)/1.35 var(--roe-ui);
}

.roe-hud-feedback-comment textarea:focus-visible {
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: 2px;
}

.roe-hud-feedback-comment > small {
    justify-self: end;
    font-weight: 400;
}

.roe-hud-feedback-status {
    min-height: 18px;
    color: var(--roe-warning-red);
    font: 600 12px/1.3 var(--roe-ui);
}

.roe-hud-feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--roe-space-3);
}

.roe-hud-feedback[data-state='sending'] {
    cursor: progress;
}

.roe-hud-feedback[data-state='sending'] :is(button, input, textarea) {
    pointer-events: none;
}

@media (max-width: 640px) {
    .roe-hud-feedback {
        width: min(540px, calc(100vw - (2 * var(--roe-space-2))));
        min-height: 0;
        max-height: calc(100vh - (2 * var(--roe-space-2)));
    }

    .roe-hud-feedback-sheet {
        padding: var(--roe-space-3);
    }

    .roe-hud-feedback-reasons {
        grid-template-columns: 1fr;
    }
}

.roe-hud-command-menu {
    width: 236px;
    min-height: 300px;
    display: grid;
    align-content: start;
    gap: var(--roe-space-2);
    padding: var(--roe-space-5);
}

.roe-hud-command-menu .roe-hud-button { width: 100%; }
.roe-hud-command-menu .roe-hud-menu-spacer { height: var(--roe-space-5); }

/* Quest journal */

.roe-hud-quest-journal {
    position: relative;
    width: 700px;
    height: 645px;
}

.roe-hud-quest-list {
    position: absolute;
    z-index: 1;
    left: 0;
    top: 64px;
    width: 284px;
    height: 500px;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    padding: var(--roe-space-3) var(--roe-space-4) var(--roe-space-3) var(--roe-space-3);
}

.roe-hud-quest-list > nav { min-height: 0; overflow: auto; }
.roe-hud-quest-status { color: var(--roe-ancient-gold); font-size: 18px; text-align: center; }

.roe-hud-quest-detail {
    position: absolute;
    z-index: 2;
    inset: 0 0 0 auto;
    width: 448px;
    height: 645px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr) 132px var(--roe-hud-footer-height);
    padding: var(--roe-space-3);
}

.roe-hud-quest-copy {
    min-height: 0;
    padding: var(--roe-space-7) var(--roe-space-7) var(--roe-space-5);
    overflow: auto;
}

.roe-hud-quest-copy h3 {
    margin: 0 0 var(--roe-space-3);
    color: var(--roe-rift-blue);
    font: 700 22px/1.1 var(--roe-display);
    text-align: center;
    text-transform: uppercase;
}

.roe-hud-quest-copy p { margin: 0 0 var(--roe-space-3); font: var(--roe-font-size-body)/1.25 var(--roe-ui); text-wrap: pretty; }
.roe-hud-rewards {
    position: relative;
    display: grid;
    align-content: center;
    justify-content: center;
    gap: var(--roe-space-2);
    padding: var(--roe-space-3);
    border-top: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 42%, transparent);
}

.roe-hud-rewards > strong { color: var(--roe-hud-reward-heading-ink); font: 700 var(--roe-font-size-body-large)/1 var(--roe-display); text-align: center; text-transform: uppercase; }
.roe-hud-reward-slots { display: flex; justify-content: center; gap: var(--roe-space-2); }
.roe-hud-quest-reward-slot { cursor: help; }
.roe-hud-quest-reward-value {
    position: absolute;
    right: var(--roe-space-1);
    bottom: var(--roe-space-1);
    min-width: 20px;
    padding: 2px var(--roe-space-1);
    border-radius: var(--roe-radius-xs);
    color: var(--roe-moonbone);
    background: var(--roe-black-iron);
    font: 800 var(--roe-font-size-caption)/1 var(--roe-ui);
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.roe-hud-quest-reward-tooltip {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: calc(100% + var(--roe-space-2));
}

/* Character and inventory */

.roe-hud-character-sheet {
    width: 448px;
    height: 635px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr) 148px;
    padding: var(--roe-space-3);
}

.roe-hud-character-stage {
    min-height: 0;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    gap: var(--roe-space-3);
    padding: var(--roe-space-3);
    overflow: hidden;
}

.roe-hud-equipment-column { display: grid; align-content: center; gap: var(--roe-space-2); }
.roe-hud-character-silhouette {
    min-width: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-inline: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 28%, transparent);
    background: color-mix(in srgb, var(--roe-rift-navy) 36%, var(--roe-black-iron));
}

.roe-hud-character-silhouette svg { width: 90%; height: 90%; color: color-mix(in srgb, var(--roe-black-iron) 88%, var(--roe-rift-navy)); filter: drop-shadow(0 0 1px var(--roe-aged-bronze)); }
.roe-hud-character-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    gap: var(--roe-space-2) var(--roe-space-5);
    padding: var(--roe-space-5) var(--roe-space-7);
    font: 700 var(--roe-font-size-label)/1.2 var(--roe-display);
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
}

.roe-hud-character-stats-title { display: none; }
.roe-hud-character-stats strong { color: var(--roe-rift-blue); }

.roe-hud-inventory {
    width: 440px;
    height: 672px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr) var(--roe-hud-footer-height);
    padding: var(--roe-space-3);
}

.roe-hud-inventory-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(5, var(--roe-hud-slot-size));
    grid-auto-rows: var(--roe-hud-slot-size);
    align-content: center;
    justify-content: center;
    gap: var(--roe-space-2);
    padding: var(--roe-space-4);
    overflow: auto;
}

.roe-hud-inventory-summary { justify-content: center; gap: var(--roe-space-4); }
.roe-hud-inventory-summary b { color: var(--roe-signal-jade-bright); }
.roe-hud-currency { display: inline-flex; align-items: center; gap: var(--roe-space-1); color: var(--roe-ancient-gold); }
.roe-hud-currency img { width: 20px; height: 20px; display: block; }

/* Skills tree */

.roe-hud-skill-tree {
    width: 1306px;
    height: 880px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr) var(--roe-hud-footer-height);
    padding: var(--roe-space-3);
}

.roe-hud-skill-workbench {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: auto;
}

.roe-hud-skill-branch {
    min-width: 0;
    display: grid;
    grid-template-rows: 52px minmax(0, 1fr);
    border-right: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 42%, var(--roe-black-iron));
}

.roe-hud-skill-branch:last-child { border-right: 0; }
.roe-hud-branch-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--roe-space-2);
    color: var(--roe-parchment-ink);
    background: var(--roe-aged-parchment);
    font: 700 var(--roe-font-size-body-large)/1 var(--roe-display);
    text-transform: uppercase;
}

.roe-hud-branch-title b { color: var(--roe-rift-blue); }
.roe-hud-skill-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
    align-items: center;
    justify-items: center;
    padding: var(--roe-space-5);
    background: transparent;
}

.roe-hud-skill-grid::before,
.roe-hud-skill-grid::after {
    content: '';
    position: absolute;
    z-index: 0;
    left: 50%;
    top: var(--roe-space-5);
    bottom: var(--roe-space-5);
    width: 1px;
    background: color-mix(in srgb, var(--roe-aged-bronze) 26%, transparent);
}

.roe-hud-skill-grid::after {
    left: var(--roe-space-5);
    right: var(--roe-space-5);
    top: 50%;
    bottom: auto;
    width: auto;
    height: 1px;
}

.roe-hud-skill-node {
    position: relative;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    padding: 6px;
    border: 2px solid var(--roe-hud-slot-edge);
    border-radius: 50%;
    background: var(--roe-black-iron);
    box-shadow: 0 0 0 3px var(--roe-charred-oak), 0 3px 8px color-mix(in srgb, var(--roe-black-iron) 70%, transparent);
    touch-action: manipulation;
}

.roe-hud-skill-node img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }
.roe-hud-skill-node[data-state='available'] { border-color: var(--roe-signal-jade-bright); }
.roe-hud-skill-node[data-state='learned'] { border-color: var(--roe-ancient-gold); }
.roe-hud-skill-node[data-state='locked'] { filter: grayscale(1); opacity: 0.48; }
.roe-hud-skill-node:not(:disabled):hover { transform: translateY(-1px); }
.roe-hud-skill-node:not(:disabled):active { transform: scale(0.97); }
.roe-hud-skill-node[data-state='learned']::after { content: ''; position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border: 1px solid var(--roe-black-iron); border-radius: 50%; background: var(--roe-signal-jade-bright); box-shadow: 0 0 0 2px color-mix(in srgb, var(--roe-signal-jade) 54%, transparent) inset; }
.roe-hud-skill-node:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 4px; }
.roe-hud-skill-banner {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    top: 50%;
    min-height: 128px;
    display: grid;
    place-content: center;
    gap: var(--roe-space-2);
    padding: var(--roe-space-4);
    transform: translateY(-50%);
    border-block: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 50%, var(--roe-black-iron));
    color: var(--roe-ancient-gold);
    background: color-mix(in srgb, var(--roe-charred-oak-deep) 94%, transparent);
    text-align: center;
}

.roe-hud-skill-banner strong { font: 700 24px/1.1 var(--roe-display); letter-spacing: 0.5px; text-transform: uppercase; }
.roe-hud-skill-banner span { color: var(--roe-hud-text-muted); font: italic var(--roe-font-size-label)/1.2 var(--roe-ui); }
.roe-hud-skill-summary { gap: var(--roe-space-6); }
.roe-hud-skill-summary b { color: var(--roe-signal-jade-bright); }

/* Settings */

.roe-hud-settings {
    width: 1128px;
    height: 875px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) 52px minmax(0, 1fr) var(--roe-hud-footer-height);
    padding: var(--roe-space-3);
}

.roe-hud-settings-tabs {
    display: flex;
    align-items: end;
    gap: var(--roe-space-1);
    padding: 0 var(--roe-space-5);
    background: var(--roe-charred-oak-deep);
}

.roe-hud-settings-tab {
    min-width: 196px;
    min-height: 48px;
    padding: 0 var(--roe-space-5);
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 58%, var(--roe-parchment-ink));
    border-bottom: 0;
    border-radius: var(--roe-radius-xs) var(--roe-radius-xs) 0 0;
    color: color-mix(in srgb, var(--roe-parchment-ink) 74%, var(--roe-aged-bronze));
    background: color-mix(in srgb, var(--roe-aged-parchment) 76%, var(--roe-aged-bronze));
    font: 700 var(--roe-font-size-body-large)/1 var(--roe-display);
    text-transform: uppercase;
    touch-action: manipulation;
}

.roe-hud-settings-tab[aria-selected='true'] { color: var(--roe-parchment-ink); background: var(--roe-aged-parchment); }
.roe-hud-settings-tab:hover { color: var(--roe-parchment-ink); background: color-mix(in srgb, var(--roe-aged-parchment) 90%, var(--roe-moonbone)); }
.roe-hud-settings-tab:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: -3px; }
.roe-hud-settings-body { min-height: 0; padding: var(--roe-space-5) var(--roe-space-6); overflow: auto; }
.roe-hud-settings-panel[hidden] { display: none; }
.roe-hud-settings-group { margin: 0 0 var(--roe-space-4); }
.roe-hud-settings-group h3 {
    margin: 0;
    padding: var(--roe-space-3);
    color: color-mix(in srgb, var(--roe-parchment-ink) 55%, var(--roe-aged-bronze));
    font: 700 var(--roe-font-size-body-large)/1 var(--roe-display);
    text-align: center;
    text-transform: uppercase;
}

.roe-hud-settings-row {
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 1fr);
    align-items: center;
    gap: var(--roe-space-5);
    padding: var(--roe-space-2) var(--roe-space-4);
    border-top: 1px solid color-mix(in srgb, var(--roe-parchment-ink) 12%, transparent);
    font: 700 var(--roe-font-size-body)/1.2 var(--roe-display);
}

.roe-hud-settings-row:nth-child(odd) { background: color-mix(in srgb, var(--roe-parchment-ink) 4%, transparent); }
.roe-hud-settings-row > label,
.roe-hud-settings-row > span:first-child { text-transform: uppercase; }
.roe-hud-settings-row > :last-child { min-width: 0; justify-self: stretch; }
.roe-hud-settings-row output { color: var(--roe-rift-blue); font-variant-numeric: tabular-nums; }
.roe-hud-settings-row input[type='range'] { width: 100%; accent-color: var(--roe-rift-blue); }
.roe-hud-settings-row select {
    width: 100%;
    min-height: 44px;
    padding: 0 var(--roe-space-3);
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 58%, var(--roe-parchment-ink));
    border-radius: var(--roe-radius-xs);
    color: var(--roe-parchment-ink);
    background-color: var(--roe-aged-parchment);
    font: 700 var(--roe-font-size-body)/1 var(--roe-ui);
}

.roe-hud-settings-row :is(select, input):focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; }
.roe-hud-settings-row[data-state='disabled'] { opacity: 0.52; }

.roe-hud-region-status {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--roe-space-3);
    min-height: 70px;
    padding: var(--roe-space-3) var(--roe-space-4);
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 48%, var(--roe-parchment-ink));
    border-radius: var(--roe-radius-xs);
    background: color-mix(in srgb, var(--roe-aged-parchment) 76%, var(--roe-charred-oak));
}

.roe-hud-region-status-mark {
    width: 12px;
    height: 12px;
    border: 2px solid color-mix(in srgb, var(--roe-parchment-ink) 54%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--roe-parchment-ink) 20%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--roe-parchment-ink) 8%, transparent);
}

.roe-hud-region-status[data-state='probing'] .roe-hud-region-status-mark,
.roe-hud-region-status[data-state='routing'] .roe-hud-region-status-mark,
.roe-hud-region-status[data-state='connecting'] .roe-hud-region-status-mark,
.roe-hud-region-status[data-state='reconnecting'] .roe-hud-region-status-mark {
    border-color: var(--roe-aged-bronze);
    background: var(--roe-moonbone);
}

.roe-hud-region-status[data-state='selected'] .roe-hud-region-status-mark,
.roe-hud-region-status[data-state='connected'] .roe-hud-region-status-mark {
    border-color: color-mix(in srgb, var(--roe-signal-jade-bright) 72%, var(--roe-parchment-ink));
    background: var(--roe-signal-jade-bright);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--roe-signal-jade-bright) 16%, transparent);
}

.roe-hud-region-status[data-state='legacy'] .roe-hud-region-status-mark,
.roe-hud-region-status[data-state='disconnected'] .roe-hud-region-status-mark {
    border-color: color-mix(in srgb, var(--roe-signal-red) 70%, var(--roe-parchment-ink));
    background: var(--roe-signal-red);
}

.roe-hud-region-status-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.roe-hud-region-status-copy strong {
    color: var(--roe-parchment-ink);
    font: 700 var(--roe-font-size-body-large)/1.1 var(--roe-display);
}

.roe-hud-region-status-copy span,
.roe-hud-region-help,
.roe-hud-region-footnote {
    color: color-mix(in srgb, var(--roe-parchment-ink) 68%, var(--roe-aged-bronze));
    font: var(--roe-font-size-label)/1.45 var(--roe-ui);
}

.roe-hud-region-status > b {
    color: var(--roe-rift-blue);
    font: 800 var(--roe-font-size-body-large)/1 var(--roe-display);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.roe-hud-region-help,
.roe-hud-region-footnote {
    margin: var(--roe-space-2) var(--roe-space-4) 0;
}

.roe-hud-region-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--roe-space-2);
}

.roe-hud-region-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--roe-space-3);
    min-height: 46px;
    padding: var(--roe-space-2) var(--roe-space-4);
    border: 1px solid color-mix(in srgb, var(--roe-parchment-ink) 15%, transparent);
    border-radius: var(--roe-radius-xs);
    background: color-mix(in srgb, var(--roe-parchment-ink) 4%, transparent);
    font: 700 var(--roe-font-size-body)/1.1 var(--roe-display);
}

.roe-hud-region-row[data-selected='true'] {
    border-color: color-mix(in srgb, var(--roe-signal-jade-bright) 58%, var(--roe-aged-bronze));
    background: color-mix(in srgb, var(--roe-signal-jade-bright) 10%, var(--roe-aged-parchment));
}

.roe-hud-region-row output {
    color: var(--roe-rift-blue);
    font-variant-numeric: tabular-nums;
}

.roe-hud-region-warning {
    display: grid;
    gap: 4px;
    margin: var(--roe-space-3) 0;
    padding: var(--roe-space-3) var(--roe-space-4);
    border-left: 4px solid var(--roe-aged-bronze);
    background: color-mix(in srgb, var(--roe-aged-bronze) 13%, transparent);
    color: var(--roe-parchment-ink);
}

.roe-hud-region-warning[data-kind='latency'] {
    border-left-color: var(--roe-signal-red);
    background: color-mix(in srgb, var(--roe-signal-red) 9%, transparent);
}

.roe-hud-region-warning strong {
    font: 700 var(--roe-font-size-body)/1.1 var(--roe-display);
    text-transform: uppercase;
}

.roe-hud-region-warning span {
    font: var(--roe-font-size-label)/1.4 var(--roe-ui);
}

.roe-hud-social-lobby {
    display: grid;
    gap: var(--roe-space-2);
    margin-top: var(--roe-space-3);
}

.roe-hud-social-lobby-row {
    display: grid;
    grid-template-columns: 12px minmax(132px, 1fr) minmax(176px, auto) minmax(104px, auto);
    align-items: center;
    gap: var(--roe-space-3);
    min-height: 52px;
    padding: var(--roe-space-1) var(--roe-space-2) var(--roe-space-1) var(--roe-space-3);
    border-bottom: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 36%, transparent);
    color: var(--roe-parchment-ink);
}

.roe-hud-social-lobby-row:last-child {
    border-bottom: 0;
}

.roe-hud-social-waystone {
    width: 10px;
    height: 18px;
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 72%, var(--roe-parchment-ink));
    border-radius: 5px 5px 2px 2px;
    background: color-mix(in srgb, var(--roe-rift-blue) 72%, var(--roe-black-iron));
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--roe-moonbone) 12%, transparent);
}

.roe-hud-social-lobby-row[data-local='true'] .roe-hud-social-waystone,
.roe-hud-social-lobby-row[data-party='true'] .roe-hud-social-waystone {
    background: var(--roe-signal-jade-bright);
}

.roe-hud-social-hero {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.roe-hud-social-hero strong,
.roe-hud-social-region {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roe-hud-social-hero strong {
    font: 700 var(--roe-font-size-body)/1.1 var(--roe-display);
}

.roe-hud-social-hero small,
.roe-hud-social-region {
    color: color-mix(in srgb, var(--roe-parchment-ink) 68%, var(--roe-aged-bronze));
    font: var(--roe-font-size-label)/1.25 var(--roe-ui);
}

.roe-hud-social-lobby-row > .roe-hud-button {
    min-height: 44px;
    padding-inline: var(--roe-space-3);
}

.roe-hud-social-lobby-empty {
    min-height: 52px;
    display: grid;
    place-items: center;
    padding: var(--roe-space-3);
    border: 1px dashed color-mix(in srgb, var(--roe-aged-bronze) 44%, transparent);
    color: color-mix(in srgb, var(--roe-parchment-ink) 62%, var(--roe-aged-bronze));
    font: var(--roe-font-size-label)/1.4 var(--roe-ui);
    text-align: center;
}

@media (max-width: 640px) {
    .roe-hud-region-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .roe-hud-social-lobby-row {
        grid-template-columns: 12px minmax(0, 1fr) minmax(104px, auto);
    }

    .roe-hud-social-region {
        grid-column: 2;
    }

    .roe-hud-social-lobby-row > .roe-hud-button {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

/* Persistent HUD */

.roe-hud-chat-preview {
    width: 420px;
    height: 220px;
    display: grid;
    grid-template-rows: 32px minmax(0, 1fr) 44px;
    overflow: hidden;
    border-radius: var(--roe-radius-xs);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--roe-black-iron) 72%, transparent),
        0 6px 16px color-mix(in srgb, var(--roe-black-iron) 48%, transparent);
}

.roe-hud-chat-preview::before,
.roe-hud-chat-preview::after { display: none; }

.roe-hud-chat-preview .roe-hud-rail {
    min-width: 0;
    min-height: 32px;
    gap: 0;
    padding-inline: var(--roe-space-1);
}

.roe-hud-chat-preview .roe-hud-tablist {
    align-items: stretch;
    gap: 0;
}

.roe-hud-chat-preview .roe-hud-tab {
    flex: 0 1 84px;
    min-width: 60px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0 var(--roe-space-3);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: var(--roe-font-size-label);
}

.roe-hud-chat-preview .roe-hud-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    border-right: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 42%, var(--roe-black-iron));
    background: transparent;
    pointer-events: none;
}

.roe-hud-chat-preview .roe-hud-tab:hover::before {
    background: color-mix(in srgb, var(--roe-aged-bronze) 12%, transparent);
}

.roe-hud-chat-preview .roe-hud-tab[aria-selected='true'] {
    color: color-mix(in srgb, var(--roe-moonbone) 84%, var(--roe-ancient-gold));
    border: 0;
    background: transparent;
    box-shadow: none;
}

.roe-hud-chat-preview .roe-hud-tab[aria-selected='true']::before {
    border-right-color: color-mix(in srgb, var(--roe-aged-bronze) 54%, var(--roe-black-iron));
    background: color-mix(in srgb, var(--roe-aged-bronze) 16%, transparent);
    box-shadow: 0 -2px 0 var(--roe-ancient-gold) inset;
}

.roe-hud-chat-preview .roe-hud-tab:focus-visible { outline-offset: -3px; }

.roe-hud-chat-preview .roe-hud-rail-grip { min-height: 32px; }

@media (pointer: coarse) {
    .roe-hud-chat-preview { grid-template-rows: 44px minmax(0, 1fr) 44px; }
    .roe-hud-chat-preview .roe-hud-rail,
    .roe-hud-chat-preview .roe-hud-rail-grip { min-height: 44px; }
    .roe-hud-chat-preview .roe-hud-tab { height: 44px; }
}

.roe-hud-chat-panel {
    min-height: 0;
    overflow: hidden;
}

.roe-hud-chat-log {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: var(--roe-space-1);
    margin: 0;
    padding: var(--roe-space-2) var(--roe-space-3);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: var(--roe-moonbone);
    font: var(--roe-font-size-body)/1.35 var(--roe-ui);
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    user-select: text;
}

.roe-hud-chat-line { margin: 0; overflow-wrap: anywhere; }
.roe-hud-chat-line strong { color: var(--roe-chat-general); }
.roe-hud-chat-line[data-channel='whisper'] strong { color: var(--roe-chat-whisper); }
.roe-hud-chat-line[data-state='pending'] { opacity: 0.58; }
.roe-hud-chat-line[data-state='failed'] { color: var(--roe-chat-failure); }
.roe-hud-chat-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    padding: 0 var(--roe-space-2);
    border-top: 1px solid var(--roe-hud-frame-edge);
    background: var(--roe-charred-oak-deep);
}

.roe-hud-chat-composer input {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: var(--roe-space-2) var(--roe-space-3);
    border: 0;
    outline: 0;
    color: var(--roe-parchment-ink);
    background: transparent;
    font: var(--roe-font-size-body)/1 var(--roe-ui);
}

.roe-hud-chat-composer input:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 4px; }

.roe-hud-hotbar {
    width: 640px;
    height: 130px;
    display: grid;
    grid-template-rows: 18px minmax(0, 1fr);
    padding: var(--roe-space-3);
}

.roe-hud-hotbar-resource { margin: 0 var(--roe-space-2); height: 14px; }
.roe-hud-hotbar-slots { display: flex; align-items: center; justify-content: center; gap: var(--roe-hud-slot-gap); }
.roe-hud-hotbar-slots .roe-hud-slot { width: 52px; height: 64px; padding: 3px 3px 12px; }
.roe-hud-hotbar-slots .roe-hud-slot:nth-child(5) { margin-right: var(--roe-space-2); }
.roe-hud-hotbar-key { position: absolute; right: 4px; bottom: 1px; z-index: 3; color: color-mix(in srgb, var(--roe-moonbone) 72%, var(--roe-aged-bronze-bright)); font: 700 var(--roe-font-size-caption)/1 var(--roe-display); }
.roe-hud-hotbar-cooldown-swipe { display: none; }

.roe-hud-touch-actions {
    width: 212px;
    min-height: 52px;
    display: flex;
    align-items: stretch;
    gap: var(--roe-space-1);
    padding: 0;
    pointer-events: auto;
}

.roe-hud-touch-actions[data-layout='vertical'] {
    width: 60px;
    min-height: 156px;
    flex-direction: column;
}

.roe-hud-touch-action {
    appearance: none;
    min-width: 68px;
    min-height: 52px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    place-items: center;
    gap: var(--roe-space-1);
    flex: 1 1 0;
    padding: var(--roe-space-1) var(--roe-space-2);
    border: 1px solid var(--roe-aged-bronze);
    border-top-color: var(--roe-aged-bronze-bright);
    border-radius: var(--roe-radius-xs);
    color: var(--roe-moonbone);
    background: color-mix(in srgb, var(--roe-charred-oak) 88%, var(--roe-black-iron));
    box-shadow: var(--roe-shadow-hud-inset), 0 2px 6px color-mix(in srgb, var(--roe-black-iron) 52%, transparent);
    font: 700 var(--roe-font-size-caption)/1 var(--roe-display);
    letter-spacing: 0.2px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.roe-hud-touch-actions[data-layout='vertical'] .roe-hud-touch-action {
    width: 60px;
    min-width: 60px;
    min-height: 48px;
    grid-template-columns: 1fr;
    grid-template-rows: 18px auto;
    gap: 0;
    padding: var(--roe-space-1);
}

.roe-hud-touch-action-mark {
    color: var(--roe-aged-bronze-bright);
    font: 800 var(--roe-font-size-body)/1 var(--roe-display);
}

.roe-hud-touch-action:is(:hover, :active, [aria-pressed='true']) {
    border-color: var(--roe-rift-blue-bright);
    background: color-mix(in srgb, var(--roe-rift-blue) 34%, var(--roe-charred-oak));
}

.roe-hud-touch-action:active { transform: translateY(1px); }
.roe-hud-touch-action:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; }
.roe-hud-touch-action:disabled { opacity: 0.46; cursor: not-allowed; }

.roe-hud-unit-frame {
    width: 310px;
    height: var(--roe-hud-unit-height);
    display: grid;
    grid-template-columns: var(--roe-hud-unit-portrait-size) minmax(0, 1fr);
    align-items: center;
}

.roe-hud-unit-portrait {
    position: relative;
    z-index: 2;
    width: var(--roe-hud-unit-portrait-size);
    height: var(--roe-hud-unit-portrait-size);
    display: grid;
    place-items: center;
    overflow: visible;
    border: 7px solid var(--roe-charred-oak);
    border-radius: 50%;
    background: var(--roe-charred-oak);
    box-shadow: 0 0 0 2px var(--roe-aged-bronze), 0 0 0 4px var(--roe-black-iron), var(--roe-shadow-hud-frame);
}

.roe-hud-unit-portrait svg { width: 72%; height: 72%; color: color-mix(in srgb, var(--roe-rift-navy) 76%, var(--roe-black-iron)); }
.roe-hud-level-badge {
    position: absolute;
    right: -7px;
    bottom: 7px;
    min-width: var(--roe-hud-level-badge-size);
    height: var(--roe-hud-level-badge-size);
    display: grid;
    place-items: center;
    border: 2px solid var(--roe-black-iron);
    border-radius: 50%;
    color: var(--roe-moonbone);
    background: var(--roe-charred-oak-deep);
    box-shadow: 0 0 0 1px var(--roe-aged-bronze);
    font: 700 var(--roe-font-size-label)/1 var(--roe-display);
    font-variant-numeric: tabular-nums;
}

.roe-hud-unit-plate {
    min-width: 0;
    display: grid;
    gap: var(--roe-space-1);
    margin-left: -4px;
    padding: var(--roe-space-3) var(--roe-space-3) var(--roe-space-3) var(--roe-space-5);
    border: 1px solid var(--roe-aged-bronze);
    border-radius: 0 var(--roe-radius-sm) var(--roe-radius-sm) 0;
    color: var(--roe-moonbone);
    background: var(--roe-charred-oak-deep);
    box-shadow: var(--roe-shadow-hud-frame);
}

.roe-hud-unit-name { overflow: hidden; font: 700 var(--roe-font-size-label)/1 var(--roe-display); text-align: center; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.roe-hud-vital { height: 16px; }
.roe-hud-vital[data-vital='health'] { --roe-progress-color: var(--roe-warning-red-bright); }
.roe-hud-vital[data-vital='mana'] { --roe-progress-color: var(--roe-rift-blue-bright); }

.roe-hud-minimap {
    position: relative;
    isolation: isolate;
    width: 220px;
    height: 220px;
    display: grid;
    place-items: center;
    padding: 18px;
    overflow: visible;
    border: 8px solid color-mix(in srgb, var(--roe-charred-oak-deep) 36%, transparent);
    border-radius: 50%;
    color: var(--roe-moonbone);
    background: url("./ui/materials/minimap-weathered-oak.webp?v=2026-07-27-avif-1") center / cover no-repeat border-box var(--roe-charred-oak);
    box-shadow: 0 0 0 2px var(--roe-aged-bronze), 0 0 0 5px var(--roe-black-iron), var(--roe-shadow-hud-frame);
}

.roe-hud-minimap-map {
    position: absolute;
    z-index: 1;
    inset: 12px;
    overflow: hidden;
    border: 1px solid var(--roe-aged-bronze);
    border-radius: 50%;
    background: color-mix(in srgb, var(--roe-signal-jade) 42%, var(--roe-aged-parchment));
    box-shadow: 0 0 18px color-mix(in srgb, var(--roe-black-iron) 54%, transparent) inset;
}

.roe-hud-minimap-map::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 9px;
    transform: translate(-50%, -50%) rotate(45deg);
    border: 1px solid var(--roe-black-iron);
    background: var(--roe-signal-jade-bright);
}

.roe-hud-compass {
    position: absolute;
    z-index: 2;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--roe-aged-bronze);
    border-radius: 50%;
    color: var(--roe-moonbone);
    background: var(--roe-charred-oak-deep);
    font: 700 var(--roe-font-size-caption)/1 var(--roe-display);
}

.roe-hud-compass[data-point='n'] { left: 50%; top: -13px; transform: translateX(-50%); }
.roe-hud-compass[data-point='s'] { left: 50%; bottom: -13px; transform: translateX(-50%); }
.roe-hud-compass[data-point='e'] { right: -13px; top: 50%; transform: translateY(-50%); }
.roe-hud-compass[data-point='w'] { left: -13px; top: 50%; transform: translateY(-50%); }
.roe-hud-minimap-control { position: absolute; z-index: 3; isolation: isolate; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--roe-moonbone); background: transparent; font: 700 18px/1 var(--roe-ui); cursor: pointer; touch-action: manipulation; }
.roe-hud-minimap-control::before { content: ''; position: absolute; z-index: -1; inset: 4px; border: 2px solid var(--roe-black-iron); border-radius: 50%; background: var(--roe-charred-oak-deep); box-shadow: 0 0 0 1px var(--roe-aged-bronze); }
.roe-hud-minimap-control[data-zoom='in'] { top: 14px; right: 16px; }
.roe-hud-minimap-control[data-zoom='out'] { top: 47px; right: -4px; }
.roe-hud-minimap-control:not(:disabled):hover { color: var(--roe-echo-cyan); }
.roe-hud-minimap-control:not(:disabled):hover::before { border-color: var(--roe-rift-blue-bright); }
.roe-hud-minimap-control:not(:disabled):active { transform: scale(0.97); }
.roe-hud-minimap-control:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; }
.roe-hud-minimap-control:disabled { color: var(--roe-hud-text-muted); cursor: not-allowed; opacity: 0.58; }

/* Expanded gameplay HUD contracts */

.roe-hud-section-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--roe-space-3);
    margin: 0;
    color: color-mix(in srgb, var(--roe-moonbone) 78%, var(--roe-aged-bronze-bright));
    font: 700 var(--roe-font-size-label)/1.15 var(--roe-display);
    letter-spacing: 0.45px;
    text-transform: uppercase;
}

.roe-hud-section-heading > :is(strong, span) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.roe-hud-status-pill {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--roe-space-2);
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 64%, var(--roe-black-iron));
    border-radius: var(--roe-radius-round);
    color: var(--roe-hud-text-muted);
    background: var(--roe-charred-oak-deep);
    font: 800 var(--roe-font-size-caption)/1 var(--roe-ui);
    letter-spacing: 0.55px;
    text-transform: uppercase;
    white-space: nowrap;
}

.roe-hud-status-pill[data-tone='success'] { color: var(--roe-hud-success); border-color: color-mix(in srgb, var(--roe-hud-success) 64%, var(--roe-black-iron)); }
.roe-hud-status-pill[data-tone='warning'] { color: var(--roe-hud-warning); border-color: color-mix(in srgb, var(--roe-hud-warning) 64%, var(--roe-black-iron)); }
.roe-hud-status-pill[data-tone='danger'] { color: var(--roe-hud-error); border-color: color-mix(in srgb, var(--roe-hud-error) 64%, var(--roe-black-iron)); }

.roe-hud-empty-state {
    min-height: 120px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: var(--roe-space-2);
    padding: var(--roe-space-5);
    color: var(--roe-hud-text-muted);
    font: var(--roe-font-size-label)/1.35 var(--roe-ui);
    text-align: center;
    text-wrap: pretty;
}

.roe-hud-empty-state[hidden] { display: none; }
.roe-hud-frame [hidden] { display: none; }

.roe-hud-empty-state > strong { color: color-mix(in srgb, var(--roe-moonbone) 76%, var(--roe-aged-bronze-bright)); font: 700 var(--roe-font-size-body-large)/1.1 var(--roe-display); }

.roe-hud-icon-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--roe-hud-slot-edge);
    border-radius: var(--roe-radius-xs);
    color: color-mix(in srgb, var(--roe-moonbone) 72%, var(--roe-aged-bronze-bright));
    background: var(--roe-hud-slot-surface);
    box-shadow: var(--roe-shadow-hud-inset);
    font: 700 var(--roe-font-size-body-large)/1 var(--roe-display);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out), transform var(--roe-motion-fast) var(--roe-ease-out);
}

.roe-hud-icon-button:hover,
.roe-hud-icon-button[aria-pressed='true'] { color: var(--roe-moonbone); border-color: var(--roe-rift-blue-bright); background: color-mix(in srgb, var(--roe-rift-blue) 42%, var(--roe-charred-oak)); }
.roe-hud-icon-button:active { transform: scale(0.97); }
.roe-hud-icon-button:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; }
.roe-hud-icon-button:disabled { opacity: 0.46; cursor: not-allowed; }

.roe-hud-target-frame {
    position: relative;
    width: 390px;
    height: 172px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 126px;
    grid-template-rows: minmax(0, 1fr) 40px;
    color: var(--roe-moonbone);
}

.roe-hud-target-frame .roe-hud-unit-plate {
    align-self: center;
    min-height: 108px;
    margin: 0 -4px 0 0;
    padding: var(--roe-space-3) var(--roe-space-5) var(--roe-space-3) var(--roe-space-3);
    border-radius: var(--roe-radius-sm) 0 0 var(--roe-radius-sm);
}

.roe-hud-target-frame .roe-hud-unit-portrait { grid-column: 2; grid-row: 1; }
.roe-hud-target-frame .roe-hud-level-badge { right: auto; left: -7px; }
.roe-hud-target-frame .roe-hud-unit-name { font-size: var(--roe-font-size-body); }

.roe-hud-target-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--roe-space-2);
    color: var(--roe-hud-text-muted);
    font: 700 var(--roe-font-size-caption)/1 var(--roe-ui);
    text-transform: uppercase;
}

.roe-hud-target-effects {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--roe-space-1);
    padding: 0 132px 0 var(--roe-space-3);
}

.roe-hud-target-statuses,
.roe-hud-target-actions {
    display: flex;
    align-items: center;
    gap: var(--roe-space-1);
}

.roe-hud-target-frame[data-target-type='npc'] .roe-hud-target-actions .roe-hud-icon-button {
    width: auto;
    min-width: 72px;
    padding-inline: var(--roe-space-3);
    font-size: var(--roe-font-size-label);
}

.roe-hud-target-effect {
    width: var(--roe-hud-target-effect-size);
    height: var(--roe-hud-target-effect-size);
    display: grid;
    place-items: center;
    border: 1px solid var(--roe-aged-bronze);
    border-radius: var(--roe-radius-xs);
    color: var(--roe-moonbone);
    background: var(--roe-charred-oak-deep);
    font: 700 var(--roe-font-size-label)/1 var(--roe-display);
}

.roe-hud-target-effect[hidden] { display: none; }

.roe-hud-target-frame[data-health-state='wounded'] .roe-hud-vital[data-vital='health'] { --roe-progress-color: var(--roe-hud-health-wounded); }
.roe-hud-target-frame[data-health-state='critical'] .roe-hud-vital[data-vital='health'] { --roe-progress-color: var(--roe-hud-error); border-color: var(--roe-hud-error); }
.roe-hud-target-frame[data-rank='boss'] .roe-hud-unit-portrait { box-shadow: 0 0 0 2px var(--roe-hud-error), 0 0 0 4px var(--roe-black-iron), var(--roe-shadow-hud-frame); }

@keyframes roeTargetVitalFill {
    from { transform: scaleX(var(--roe-previous-progress-scale, 1)); }
    to { transform: scaleX(var(--roe-progress-scale, 1)); }
}

@keyframes roeTargetVitalEcho {
    0%, 22% {
        opacity: 0.82;
        transform: scaleX(var(--roe-previous-progress-scale, 1));
    }
    100% {
        opacity: 0;
        transform: scaleX(var(--roe-progress-scale, 1));
    }
}

.roe-hud-target-frame[data-vital-transition='damage'] .roe-hud-vital[data-vital='health']::before {
    content: '';
    position: absolute;
    z-index: 0;
    inset: 0;
    background: color-mix(in srgb, var(--roe-hud-error) 54%, var(--roe-black-iron));
    transform: scaleX(var(--roe-previous-progress-scale, 1));
    transform-origin: left center;
    animation: roeTargetVitalEcho var(--roe-motion-standard) var(--roe-ease-out) 80ms both;
    pointer-events: none;
}

.roe-hud-target-frame[data-vital-transition='damage'] .roe-hud-vital[data-vital='health'] > span {
    z-index: 1;
    width: 100%;
    transform: scaleX(var(--roe-progress-scale, 1));
    transform-origin: left center;
    animation: roeTargetVitalFill var(--roe-motion-fast) var(--roe-ease-out) both;
}

.roe-hud-target-frame[data-vital-transition='damage'] .roe-hud-vital[data-vital='health'] > b {
    z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
    .roe-hud-target-frame[data-vital-transition='damage'] .roe-hud-vital[data-vital='health']::before {
        display: none;
    }

    .roe-hud-target-frame[data-vital-transition='damage'] .roe-hud-vital[data-vital='health'] > span {
        animation: none;
    }
}

.roe-hud-party {
    width: 372px;
    height: 258px;
    display: grid;
    grid-template-rows: 44px minmax(0, 1fr);
    padding: var(--roe-space-3);
}

.roe-hud-party .roe-hud-titlebar { min-height: 44px; }
.roe-hud-party-list { min-height: 0; display: grid; align-content: start; gap: var(--roe-space-1); padding: var(--roe-space-2); overflow: auto; }
.roe-hud-party-member {
    min-width: 0;
    min-height: 60px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--roe-space-2);
    padding: var(--roe-space-2);
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 42%, var(--roe-black-iron));
    border-radius: var(--roe-radius-xs);
    background: color-mix(in srgb, var(--roe-charred-oak) 62%, var(--roe-black-iron));
}

.roe-hud-party-portrait { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--roe-aged-bronze); border-radius: 50%; color: var(--roe-aged-bronze-bright); background: var(--roe-black-iron); font: 700 var(--roe-font-size-label)/1 var(--roe-display); }
.roe-hud-party-copy { min-width: 0; display: grid; gap: var(--roe-space-1); }
.roe-hud-party-copy > strong { overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-label)/1 var(--roe-display); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-party-vitals { display: grid; gap: 2px; }
.roe-hud-party-vitals .roe-hud-progress { height: 8px; }
.roe-hud-party-member[data-health-state='critical'] { border-color: color-mix(in srgb, var(--roe-hud-error) 72%, var(--roe-black-iron)); }

.roe-hud-utility-dock {
    width: 236px;
    height: 44px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--roe-space-1);
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.roe-hud-icon-button > svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.roe-hud-utility-hub {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
}

.roe-hud-utility-hub-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    padding: 0;
    border: 0;
    border-radius: var(--roe-radius-xs);
    color: color-mix(in srgb, var(--roe-moonbone) 84%, var(--roe-aged-bronze-bright));
    background: transparent;
    box-shadow: none;
}

.roe-hud-utility-hub-toggle > svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 2px var(--roe-black-iron));
}

.roe-hud-utility-hub-toggle:is(:hover, .menu-open, [aria-pressed='true'], [data-state='speaking']) {
    color: var(--roe-moonbone);
    background: color-mix(in srgb, var(--roe-rift-blue) 34%, transparent);
}

.roe-hud-utility-hub-toggle:focus-visible {
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: 2px;
}

.roe-hud-utility-hub-toggle[data-state='speaking'] {
    color: var(--roe-hud-warning);
    background: color-mix(in srgb, var(--roe-hud-warning) 20%, transparent);
}

.roe-hud-quest-tracker {
    width: 300px;
    height: auto;
    max-height: 360px;
    display: block;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.roe-hud-quest-tracker-body {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: var(--roe-space-2);
    padding: 0;
    overflow: visible;
}

.roe-hud-quest-tracker .quest-tracker-entry { min-width: 0; }
.roe-hud-quest-tracker .quest-tracker-item {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: var(--roe-space-1) 0;
    border: 0;
    color: var(--roe-moonbone);
    background: transparent;
    text-align: left;
}

.roe-hud-quest-tracker .quest-tracker-title {
    overflow: hidden;
    color: var(--roe-moonbone);
    font: 700 var(--roe-font-size-label)/1.2 var(--roe-display);
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px var(--roe-black-iron), 0 0 6px var(--roe-black-iron);
    white-space: nowrap;
}

.roe-hud-quest-tracker .quest-tracker-objective {
    display: block;
    margin: 0;
    overflow: hidden;
    color: color-mix(in srgb, var(--roe-moonbone) 72%, var(--roe-aged-bronze-bright));
    font: var(--roe-font-size-caption)/1.35 var(--roe-ui);
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px var(--roe-black-iron), 0 0 5px var(--roe-black-iron);
    white-space: nowrap;
}

.roe-hud-quest-tracker .quest-tracker-item:focus-visible {
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: 2px;
}
.roe-hud-objective { display: grid; gap: var(--roe-space-2); padding: var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 44%, var(--roe-black-iron)); background: color-mix(in srgb, var(--roe-charred-oak) 68%, var(--roe-black-iron)); }
.roe-hud-objective > span { display: flex; justify-content: space-between; gap: var(--roe-space-3); color: color-mix(in srgb, var(--roe-moonbone) 82%, var(--roe-aged-bronze-bright)); font: 700 var(--roe-font-size-label)/1.2 var(--roe-display); }
.roe-hud-objective > span b { color: var(--roe-hud-warning); font-variant-numeric: tabular-nums; }

.roe-hud-roster {
    width: 300px;
    height: auto;
    max-height: 360px;
    display: block;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.roe-hud-roster-list {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 2px;
    padding: 0;
    overflow: visible;
}

.roe-hud-roster-row {
    width: 100%;
    height: 28px;
    min-width: 0;
    min-height: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(64px, 88px);
    align-items: center;
    gap: var(--roe-space-2);
    padding: 0;
    border: 0;
    color: var(--roe-moonbone);
    background: transparent;
    text-align: left;
}

.roe-hud-roster-row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px var(--roe-black-iron), 0 0 6px var(--roe-black-iron);
    white-space: nowrap;
}

.roe-hud-roster-row > span:first-child {
    color: var(--roe-moonbone);
    font: 700 var(--roe-font-size-label)/1 var(--roe-display);
}

.roe-hud-roster-row > span:not(:first-child) {
    color: color-mix(in srgb, var(--roe-moonbone) 72%, var(--roe-aged-bronze-bright));
    font: var(--roe-font-size-caption)/1 var(--roe-ui);
}

.roe-hud-roster-row > span:last-child { text-align: right; }
.roe-hud-roster-row:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; }
.roe-hud-castbar {
    width: 420px;
    height: 92px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: var(--roe-space-3);
    padding: var(--roe-space-3) var(--roe-space-4);
}

.roe-hud-cast-icon { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--roe-aged-bronze); border-radius: 50%; background: var(--roe-black-iron); box-shadow: var(--roe-shadow-hud-inset); }
.roe-hud-cast-icon img { width: 44px; height: 44px; display: block; border-radius: 50%; object-fit: cover; }
.roe-hud-cast-copy { min-width: 0; display: grid; gap: var(--roe-space-2); }
.roe-hud-cast-heading { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: var(--roe-space-2); }
.roe-hud-cast-heading > span { color: var(--roe-hud-cast); font: 800 var(--roe-font-size-caption)/1 var(--roe-ui); letter-spacing: 0.7px; text-transform: uppercase; }
.roe-hud-cast-heading > strong { overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-label)/1 var(--roe-display); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-cast-heading > output { color: var(--roe-hud-text-muted); font: 700 var(--roe-font-size-caption)/1 var(--roe-ui); font-variant-numeric: tabular-nums; }
.roe-hud-castbar .roe-hud-progress { height: 16px; --roe-progress-color: var(--roe-hud-cast); }
.roe-hud-castbar[data-state='completed'] { border-color: var(--roe-hud-success); }
.roe-hud-castbar[data-state='completed'] .roe-hud-progress { --roe-progress-color: var(--roe-hud-success); }
.roe-hud-castbar[data-state='interrupted'] { border-color: var(--roe-hud-error); }
.roe-hud-castbar[data-state='interrupted'] .roe-hud-progress { --roe-progress-color: var(--roe-hud-error); }

/* Activatable revision styles load from assets/ui-revisions. */

.roe-hud-activity {
    width: 390px;
    height: 92px;
    display: grid;
    align-content: center;
    gap: var(--roe-space-3);
    padding: var(--roe-space-3) var(--roe-space-5);
}

.roe-hud-activity .roe-hud-progress { height: 16px; --roe-progress-color: var(--roe-hud-warning); }
.roe-hud-activity[data-kind='mining'] .roe-hud-progress { --roe-progress-color: var(--roe-aged-bronze-bright); }
.roe-hud-activity[data-kind='gathering'] .roe-hud-progress { --roe-progress-color: var(--roe-hud-success); }
.roe-hud-activity[data-state='interrupted'] { border-color: var(--roe-hud-error); }

.roe-hud-loot {
    width: 320px;
    height: 248px;
    display: grid;
    grid-template-rows: 44px minmax(0, 1fr);
    padding: var(--roe-space-3);
}

.roe-hud-loot .roe-hud-titlebar { min-height: 44px; }
.roe-hud-loot-list { min-height: 0; display: grid; align-content: start; gap: var(--roe-space-1); padding: var(--roe-space-2); overflow: auto; }
.roe-hud-loot-row { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: var(--roe-space-2); padding: var(--roe-space-1) var(--roe-space-2); border-bottom: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 34%, transparent); color: var(--roe-moonbone); }
.roe-hud-loot-row img { width: 34px; height: 34px; display: block; border-radius: var(--roe-radius-xs); object-fit: cover; }
.roe-hud-loot-row > span { min-width: 0; overflow: hidden; font: 700 var(--roe-font-size-label)/1.2 var(--roe-ui); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-loot-row > b { color: var(--roe-hud-text-muted); font: 800 var(--roe-font-size-caption)/1 var(--roe-ui); text-transform: uppercase; }
.roe-hud-loot-row[data-rarity='rare'] > b { color: var(--roe-rift-blue-bright); }
.roe-hud-loot-row[data-rarity='unique'] > b { color: var(--roe-hud-currency); }

.roe-hud-notice {
    width: 420px;
    min-height: 104px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 44px;
    align-items: center;
    gap: var(--roe-space-3);
    padding: var(--roe-space-3) var(--roe-space-4);
}

.roe-hud-notice-mark { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--roe-aged-bronze); border-radius: 50%; color: var(--roe-aged-bronze-bright); background: var(--roe-black-iron); font: 700 22px/1 var(--roe-display); }
.roe-hud-notice-copy { min-width: 0; }
.roe-hud-notice-copy > strong { display: block; overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-body)/1.2 var(--roe-display); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-notice-copy > p { margin: var(--roe-space-1) 0 0; overflow-wrap: anywhere; color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.35 var(--roe-ui); text-wrap: pretty; }
.roe-hud-notice[data-tone='success'] { border-color: var(--roe-hud-success); }
.roe-hud-notice[data-tone='success'] .roe-hud-notice-mark { color: var(--roe-hud-success); border-color: var(--roe-hud-success); }
.roe-hud-notice[data-tone='warning'] { border-color: var(--roe-hud-warning); }
.roe-hud-notice[data-tone='error'] { border-color: var(--roe-hud-error); }

.roe-hud-zone-banner {
    width: 620px;
    height: 96px;
    display: grid;
    place-items: center;
    padding: var(--roe-space-3) var(--roe-space-7);
    border-block: 1px solid var(--roe-aged-bronze);
    color: var(--roe-moonbone);
    background: color-mix(in srgb, var(--roe-charred-oak-deep) 92%, transparent);
    clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
    text-align: center;
}

.roe-hud-zone-banner > span { color: var(--roe-hud-text-muted); font: 800 var(--roe-font-size-caption)/1 var(--roe-ui); letter-spacing: 1.4px; text-transform: uppercase; }
.roe-hud-zone-banner > strong { font: 700 30px/1 var(--roe-display); letter-spacing: 0.7px; text-wrap: balance; }

.roe-hud-player-nameplate {
    display: grid;
    justify-items: center;
    gap: var(--roe-space-1);
    color: var(--roe-hud-text);
    text-align: center;
    text-shadow: 0 2px 2px var(--roe-echo-void), 0 0 7px var(--roe-echo-void);
    white-space: nowrap;
}

.roe-hud-player-nameplate-name { color: inherit; font: 700 24px/1 var(--roe-display); letter-spacing: 0.2px; }
.roe-hud-player-nameplate-guild { color: var(--roe-chat-guild); font: 600 18px/1 var(--roe-display); letter-spacing: 0.1px; }
.roe-hud-player-nameplate[data-party-member='true'] { color: var(--roe-chat-party); }
.roe-hud-player-nameplate[data-party-member='true'] > :is(.roe-hud-player-nameplate-name, .roe-hud-player-nameplate-guild) { color: inherit; }

.roe-hud-npc-nameplate {
    color: var(--roe-hud-text);
    font: 700 var(--roe-font-size-body-large)/1 var(--roe-display);
    letter-spacing: 0.2px;
    text-align: center;
    text-shadow: 0 2px 2px var(--roe-echo-void), 0 0 7px var(--roe-echo-void);
    white-space: nowrap;
}

.roe-hud-mastery-badge {
    width: 240px;
    height: 84px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: var(--roe-space-1);
    padding: var(--roe-space-3);
    border-color: var(--roe-hud-cast);
    text-align: center;
}

.roe-hud-mastery-badge > strong { color: var(--roe-hud-cast); font: 700 var(--roe-font-size-body-large)/1 var(--roe-display); }
.roe-hud-mastery-badge > small { color: var(--roe-hud-text-muted); font: 800 var(--roe-font-size-caption)/1 var(--roe-ui); letter-spacing: 1px; text-transform: uppercase; }

.roe-hud-tooltip {
    width: 300px;
    min-height: 190px;
    display: grid;
    align-content: start;
    gap: var(--roe-space-2);
    padding: var(--roe-space-4);
    color: var(--roe-moonbone);
    pointer-events: none;
}

.roe-hud-tooltip > strong { color: var(--roe-hud-currency); font: 700 var(--roe-font-size-body-large)/1.15 var(--roe-display); text-wrap: balance; }
.roe-hud-tooltip > p { margin: 0; color: color-mix(in srgb, var(--roe-moonbone) 78%, var(--roe-aged-bronze-bright)); font: var(--roe-font-size-label)/1.4 var(--roe-ui); text-wrap: pretty; }
.roe-hud-tooltip-row { display: flex; justify-content: space-between; gap: var(--roe-space-4); color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.2 var(--roe-ui); }
.roe-hud-tooltip-row > b { color: var(--roe-moonbone); font-variant-numeric: tabular-nums; }

/* Dialogue and trade */

.roe-hud-dialogue {
    width: 760px;
    height: 720px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr) var(--roe-hud-footer-height);
    padding: var(--roe-space-3);
    overflow: visible;
}

.roe-hud-dialogue-body {
    min-height: 0;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
}

.roe-hud-dialogue-speaker {
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: var(--roe-space-4);
    border-right: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 48%, var(--roe-black-iron));
    background: color-mix(in srgb, var(--roe-rift-navy) 28%, var(--roe-black-iron));
}

.roe-hud-dialogue-portrait { min-height: 0; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 52%, var(--roe-black-iron)); background: var(--roe-black-iron); box-shadow: var(--roe-shadow-hud-inset); }
.roe-hud-dialogue-portrait svg { width: 78%; height: 78%; color: color-mix(in srgb, var(--roe-rift-navy) 78%, var(--roe-black-iron)); }
.roe-hud-dialogue-speaker-copy { display: grid; gap: var(--roe-space-1); padding-top: var(--roe-space-3); text-align: center; }
.roe-hud-dialogue-speaker-copy > strong { color: var(--roe-moonbone); font: 700 var(--roe-font-size-body-large)/1.1 var(--roe-display); }
.roe-hud-dialogue-speaker-copy > span { color: var(--roe-hud-text-muted); font: 800 var(--roe-font-size-caption)/1 var(--roe-ui); letter-spacing: 0.8px; text-transform: uppercase; }

.roe-hud-dialogue-copy { min-height: 0; display: grid; align-content: start; gap: var(--roe-space-4); padding: var(--roe-space-6); overflow: auto; }
.roe-hud-dialogue-copy > header { display: grid; gap: var(--roe-space-2); text-align: center; }
.roe-hud-dialogue-copy > header h3 { margin: 0; color: var(--roe-rift-blue); font: 700 24px/1.1 var(--roe-display); text-wrap: balance; text-transform: uppercase; }
.roe-hud-dialogue-copy > header p,
.roe-hud-dialogue-copy > p { margin: 0; font: var(--roe-font-size-body)/1.45 var(--roe-ui); text-wrap: pretty; }
.roe-hud-dialogue-quest-content { display: grid; gap: var(--roe-space-4); }
.roe-hud-dialogue-objective { display: grid; gap: var(--roe-space-2); padding: var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 48%, transparent); background: color-mix(in srgb, var(--roe-moonbone) 18%, transparent); }
.roe-hud-dialogue-objective > div { display: flex; justify-content: space-between; gap: var(--roe-space-3); font: 700 var(--roe-font-size-label)/1.2 var(--roe-ui); }
.roe-hud-dialogue-rewards-wrap { display: grid; gap: var(--roe-space-2); }
.roe-hud-dialogue-rewards { display: flex; align-items: center; gap: var(--roe-space-2); }

.roe-hud-invitation {
    width: 500px;
    height: 124px;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--roe-space-3);
    padding: var(--roe-space-3) var(--roe-space-4);
}

.roe-hud-invitation-mark { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--roe-aged-bronze); border-radius: 50%; color: var(--roe-aged-bronze-bright); background: var(--roe-black-iron); font: 700 22px/1 var(--roe-display); }
.roe-hud-invitation-copy { min-width: 0; }
.roe-hud-invitation-copy > strong { display: block; overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-body)/1.15 var(--roe-display); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-invitation-copy > p { margin: var(--roe-space-1) 0 0; overflow: hidden; color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.3 var(--roe-ui); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-invitation-actions { display: flex; gap: var(--roe-space-1); }
.roe-hud-invitation-actions .roe-hud-icon-button:first-child { color: var(--roe-hud-success); }
.roe-hud-invitation-actions .roe-hud-icon-button:last-child { color: var(--roe-hud-error); }
.roe-hud-invitation[data-kind='guild'] { border-color: color-mix(in srgb, var(--roe-rift-violet) 64%, var(--roe-aged-bronze)); }
.roe-hud-invitation[data-kind='trade'] { border-color: var(--roe-hud-currency); }

.roe-hud-trade {
    width: 900px;
    height: 760px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr) var(--roe-hud-footer-height);
    padding: var(--roe-space-3);
    overflow: visible;
}

.roe-hud-trade-body { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--roe-space-3); padding: var(--roe-space-4); overflow: auto; }
.roe-hud-trade-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--roe-space-3); }
.roe-hud-trade-offer { min-width: 0; display: grid; align-content: start; gap: var(--roe-space-3); padding: var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 46%, var(--roe-black-iron)); background: color-mix(in srgb, var(--roe-charred-oak) 64%, var(--roe-black-iron)); }
.roe-hud-trade-offer > header { display: flex; align-items: center; justify-content: space-between; gap: var(--roe-space-3); }
.roe-hud-trade-offer > header strong { min-width: 0; overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-body)/1.1 var(--roe-display); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-trade-slots { display: grid; grid-template-columns: repeat(4, var(--roe-hud-slot-size)); justify-content: center; gap: var(--roe-space-2); }
.roe-hud-trade-gold { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--roe-space-3); padding: var(--roe-space-2); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 38%, var(--roe-black-iron)); color: var(--roe-hud-currency); font: 700 var(--roe-font-size-label)/1 var(--roe-ui); }
.roe-hud-trade-gold input { min-width: 0; width: 100%; min-height: 40px; padding: 0 var(--roe-space-3); border: 1px solid var(--roe-aged-bronze); border-radius: var(--roe-radius-xs); color: var(--roe-moonbone); background-color: var(--roe-black-iron); font: 700 var(--roe-font-size-body)/1 var(--roe-ui); font-variant-numeric: tabular-nums; }
.roe-hud-trade-gold input:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; }
.roe-hud-trade-backpack { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--roe-space-2); padding: var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 46%, var(--roe-black-iron)); background: var(--roe-black-iron); }
.roe-hud-trade-backpack-grid { min-height: 0; display: grid; grid-template-columns: repeat(10, var(--roe-hud-slot-size)); align-content: start; justify-content: center; gap: var(--roe-space-2); overflow: auto; }
.roe-hud-trade-status { min-width: 0; margin-right: auto; overflow: hidden; color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.25 var(--roe-ui); text-overflow: ellipsis; white-space: nowrap; }

/* Codex and progression workspaces */

.roe-hud-codex-panel {
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr) var(--roe-hud-footer-height);
    padding: var(--roe-space-3);
    overflow: visible;
}

.roe-hud-codex-body { min-height: 0; padding: var(--roe-space-4); overflow: auto; }
.roe-hud-codex-panel .roe-hud-footer { justify-content: flex-end; }
.roe-hud-codex-summary { margin-right: auto; color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.25 var(--roe-ui); }
.roe-hud-codex-summary b { color: var(--roe-hud-currency); font-variant-numeric: tabular-nums; }

.roe-hud-guild {
    width: 1180px;
    height: 780px;
}

.roe-hud-guild-layout { min-height: 0; display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: var(--roe-space-4); }
.roe-hud-guild-sidebar,
.roe-hud-guild-browser { min-height: 0; display: grid; align-content: start; gap: var(--roe-space-4); padding: var(--roe-space-4); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 44%, var(--roe-black-iron)); background: color-mix(in srgb, var(--roe-charred-oak) 62%, var(--roe-black-iron)); overflow: auto; }
.roe-hud-guild-emblem { width: 72px; height: 72px; display: grid; place-items: center; border: 1px solid var(--roe-aged-bronze); border-radius: 50%; background: var(--roe-black-iron); }
.roe-hud-guild-emblem img { width: 64px; height: 64px; display: block; object-fit: contain; }
.roe-hud-guild-identity { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: var(--roe-space-3); }
.roe-hud-guild-identity h3 { margin: 0; color: var(--roe-moonbone); font: 700 22px/1.1 var(--roe-display); text-wrap: balance; }
.roe-hud-guild-identity p { margin: var(--roe-space-1) 0 0; color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.35 var(--roe-ui); text-wrap: pretty; }
.roe-hud-guild-roster { display: grid; gap: var(--roe-space-1); }
.roe-hud-guild-member { min-width: 0; min-height: 44px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: var(--roe-space-2); padding: var(--roe-space-2); border-bottom: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 26%, transparent); }
.roe-hud-guild-member > i { width: 7px; height: 7px; border-radius: 50%; background: var(--roe-hud-text-muted); }
.roe-hud-guild-member[data-online='true'] > i { background: var(--roe-hud-success); }
.roe-hud-guild-member > strong { min-width: 0; overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-label)/1 var(--roe-ui); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-guild-member > span { color: var(--roe-hud-text-muted); font: var(--roe-font-size-caption)/1 var(--roe-ui); }
.roe-hud-guild-list { display: grid; gap: var(--roe-space-2); }
.roe-hud-guild-card { min-width: 0; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: var(--roe-space-3); padding: var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 44%, var(--roe-black-iron)); background: var(--roe-black-iron); }
.roe-hud-guild-card img { width: 56px; height: 56px; display: block; object-fit: contain; }
.roe-hud-guild-card-copy { min-width: 0; }
.roe-hud-guild-card-copy > strong { display: block; overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-body)/1.1 var(--roe-display); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-guild-card-copy > p { margin: var(--roe-space-1) 0 0; color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.35 var(--roe-ui); text-wrap: pretty; }

.roe-hud-professions {
    width: 1120px;
    height: 780px;
}

.roe-hud-profession-grid { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--roe-space-4); }
.roe-hud-profession-card { min-width: 0; display: grid; align-content: start; gap: var(--roe-space-3); padding: var(--roe-space-4); border: 1px solid color-mix(in srgb, var(--roe-hud-success) 34%, var(--roe-aged-bronze)); background: color-mix(in srgb, var(--roe-charred-oak) 64%, var(--roe-black-iron)); }
.roe-hud-profession-card > header { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: var(--roe-space-3); }
.roe-hud-profession-mark { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid var(--roe-hud-success); border-radius: 50%; color: var(--roe-hud-success); background: var(--roe-black-iron); font: 700 24px/1 var(--roe-display); }
.roe-hud-profession-copy { min-width: 0; }
.roe-hud-profession-copy > strong { display: block; overflow: hidden; color: var(--roe-moonbone); font: 700 20px/1.1 var(--roe-display); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-profession-copy > span { display: block; margin-top: var(--roe-space-1); color: var(--roe-hud-text-muted); font: var(--roe-font-size-caption)/1.3 var(--roe-ui); }
.roe-hud-profession-xp { height: 18px; --roe-progress-color: var(--roe-hud-success); }
.roe-hud-resource-list { display: grid; gap: var(--roe-space-2); }
.roe-hud-resource-row { min-width: 0; min-height: 52px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: var(--roe-space-2); padding: var(--roe-space-2); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 34%, var(--roe-black-iron)); background: var(--roe-black-iron); }
.roe-hud-resource-row img { width: 40px; height: 40px; display: block; border-radius: 50%; object-fit: cover; }
.roe-hud-resource-row > span { min-width: 0; overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-label)/1.2 var(--roe-ui); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-resource-row > b { color: var(--roe-hud-success); font: 800 var(--roe-font-size-caption)/1 var(--roe-ui); text-transform: uppercase; }
.roe-hud-resource-row[data-state='locked'] { filter: grayscale(1); opacity: 0.48; }

.roe-hud-mount-stable {
    width: 1180px;
    height: 780px;
}

.roe-hud-mount-grid { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--roe-space-4); }
.roe-hud-mount-card { min-width: 0; display: grid; grid-template-rows: 230px minmax(0, 1fr) auto; overflow: hidden; border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 54%, var(--roe-black-iron)); background: color-mix(in srgb, var(--roe-charred-oak) 64%, var(--roe-black-iron)); }
.roe-hud-mount-art { position: relative; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 34%, transparent); background: color-mix(in srgb, var(--roe-rift-navy) 28%, var(--roe-black-iron)); }
.roe-hud-mount-art svg { width: 78%; height: 78%; color: color-mix(in srgb, var(--roe-aged-bronze-bright) 74%, var(--roe-black-iron)); }
.roe-hud-mount-copy { min-width: 0; display: grid; align-content: start; gap: var(--roe-space-2); padding: var(--roe-space-4); }
.roe-hud-mount-copy h3 { margin: 0; color: var(--roe-moonbone); font: 700 21px/1.1 var(--roe-display); text-wrap: balance; }
.roe-hud-mount-copy p { margin: 0; color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.4 var(--roe-ui); text-wrap: pretty; }
.roe-hud-mount-stats { display: flex; justify-content: space-between; gap: var(--roe-space-3); color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.2 var(--roe-ui); }
.roe-hud-mount-stats b { color: var(--roe-hud-success); font-variant-numeric: tabular-nums; }
.roe-hud-mount-card > .roe-hud-button { width: calc(100% - var(--roe-space-6)); margin: 0 var(--roe-space-3) var(--roe-space-3); }
.roe-hud-mount-card[data-state='locked'] { filter: grayscale(1); opacity: 0.5; }
.roe-hud-mount-card[data-state='active'] { border-color: var(--roe-hud-success); }

.roe-hud-help {
    width: 980px;
    height: 720px;
}

.roe-hud-help-grid { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--roe-space-4); }
.roe-hud-help-card { min-width: 0; display: grid; align-content: start; gap: var(--roe-space-3); padding: var(--roe-space-4); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 44%, var(--roe-black-iron)); background: color-mix(in srgb, var(--roe-charred-oak) 62%, var(--roe-black-iron)); }
.roe-hud-help-card h3 { margin: 0; color: var(--roe-hud-currency); font: 700 var(--roe-font-size-body-large)/1.1 var(--roe-display); text-wrap: balance; }
.roe-hud-help-card p,
.roe-hud-help-card li { color: color-mix(in srgb, var(--roe-moonbone) 76%, var(--roe-aged-bronze-bright)); font: var(--roe-font-size-label)/1.45 var(--roe-ui); text-wrap: pretty; }
.roe-hud-help-card ul { margin: 0; padding-left: var(--roe-space-5); }
.roe-hud-key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--roe-space-3); padding: var(--roe-space-2) 0; border-bottom: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 24%, transparent); color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.2 var(--roe-ui); }
.roe-hud-key-row kbd { padding: var(--roe-space-1) var(--roe-space-2); border: 1px solid var(--roe-aged-bronze); border-radius: var(--roe-radius-xs); color: var(--roe-moonbone); background: var(--roe-black-iron); font: 700 var(--roe-font-size-caption)/1 var(--roe-ui); }

.roe-hud-world-map {
    width: 1280px;
    height: 820px;
}

.roe-hud-map-layout { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: var(--roe-space-4); }
.roe-hud-map-stage { position: relative; min-height: 0; overflow: hidden; border: 1px solid var(--roe-aged-bronze); background: var(--roe-hud-map-surface); box-shadow: 0 0 42px color-mix(in srgb, var(--roe-parchment-ink) 24%, transparent) inset; }
.roe-hud-map-stage svg { width: 100%; height: 100%; display: block; }
.roe-hud-map-region { fill: color-mix(in srgb, var(--roe-signal-jade) 24%, var(--roe-aged-parchment)); stroke: color-mix(in srgb, var(--roe-aged-bronze) 58%, transparent); stroke-width: 2; }
.roe-hud-map-region[data-zone='frost'] { fill: color-mix(in srgb, var(--roe-rift-blue-bright) 18%, var(--roe-aged-parchment)); }
.roe-hud-map-region[data-zone='ash'] { fill: color-mix(in srgb, var(--roe-warning-red) 18%, var(--roe-aged-parchment)); }
.roe-hud-map-route { fill: none; stroke: color-mix(in srgb, var(--roe-aged-bronze) 68%, transparent); stroke-width: 4; stroke-dasharray: 8 6; }
.roe-hud-map-marker { position: absolute; min-width: 92px; min-height: 44px; display: grid; place-items: center; padding: var(--roe-space-2); border: 1px solid var(--roe-aged-bronze); border-radius: var(--roe-radius-xs); color: var(--roe-moonbone); background: color-mix(in srgb, var(--roe-charred-oak-deep) 94%, transparent); font: 700 var(--roe-font-size-caption)/1.2 var(--roe-display); text-align: center; touch-action: manipulation; }
.roe-hud-map-marker:hover { border-color: var(--roe-rift-blue-bright); }
.roe-hud-map-marker:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; }
.roe-hud-map-marker[data-zone='greenway'] { left: 43%; top: 48%; }
.roe-hud-map-marker[data-zone='moonwell'] { left: 18%; top: 18%; }
.roe-hud-map-marker[data-zone='sunken'] { left: 63%; top: 20%; }
.roe-hud-map-marker[data-zone='titan'] { left: 16%; top: 70%; }
.roe-hud-map-marker[data-zone='frost'] { left: 65%; top: 68%; }
.roe-hud-map-sidebar { min-height: 0; display: grid; align-content: start; gap: var(--roe-space-3); overflow: auto; }
.roe-hud-map-card { display: grid; gap: var(--roe-space-2); padding: var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 44%, var(--roe-black-iron)); background: color-mix(in srgb, var(--roe-charred-oak) 64%, var(--roe-black-iron)); }
.roe-hud-map-card h3 { margin: 0; color: var(--roe-hud-currency); font: 700 var(--roe-font-size-body-large)/1.1 var(--roe-display); text-wrap: balance; }
.roe-hud-map-card p { margin: 0; color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.4 var(--roe-ui); text-wrap: pretty; }
.roe-hud-map-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--roe-space-2); color: color-mix(in srgb, var(--roe-moonbone) 72%, var(--roe-aged-bronze-bright)); font: var(--roe-font-size-caption)/1.2 var(--roe-ui); }

.roe-hud-talent-workbench {
    width: 1180px;
    height: 760px;
}

.roe-hud-talents {
    width: 720px;
    height: 700px;
}

.roe-hud-enchanting {
    width: 680px;
    height: 660px;
}

.roe-hud-talent-layout { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr); gap: var(--roe-space-4); }
.roe-hud-progression-body { min-height: 0; display: grid; padding: var(--roe-space-4); overflow: hidden; }
.roe-hud-talent-pane,
.roe-hud-progression-pane { min-height: 0; display: grid; align-content: start; gap: var(--roe-space-3); padding: var(--roe-space-3); overflow: auto; border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 42%, var(--roe-black-iron)); background: var(--roe-black-iron); }
.roe-hud-talent-row { min-width: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: var(--roe-space-3); padding: var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 38%, var(--roe-black-iron)); background: var(--roe-charred-oak-deep); }
.roe-hud-talent-row img { width: 50px; height: 50px; display: block; border-radius: 50%; object-fit: cover; }
.roe-hud-talent-row > span { min-width: 0; }
.roe-hud-talent-row strong,
.roe-hud-talent-row small { display: block; }
.roe-hud-talent-row strong { overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-label)/1.1 var(--roe-display); text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-talent-row small { margin-top: var(--roe-space-1); color: var(--roe-hud-text-muted); font: var(--roe-font-size-caption)/1.35 var(--roe-ui); }
.roe-hud-talent-row[data-state='learned'] { border-color: var(--roe-hud-success); }
.roe-hud-talent-row[data-state='locked'] { filter: grayscale(1); opacity: 0.5; }
.roe-hud-enchant-list { display: grid; gap: var(--roe-space-2); }
.roe-hud-enchant-item { min-width: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: var(--roe-space-2); padding: var(--roe-space-2); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 38%, var(--roe-black-iron)); background: var(--roe-charred-oak-deep); }
.roe-hud-enchant-item img { width: 42px; height: 42px; display: block; border-radius: var(--roe-radius-xs); object-fit: cover; }
.roe-hud-enchant-item > span { min-width: 0; overflow: hidden; color: var(--roe-moonbone); font: 700 var(--roe-font-size-label)/1.2 var(--roe-ui); text-overflow: ellipsis; white-space: nowrap; }

.roe-hud-player-inspect {
    width: 980px;
    height: 760px;
}

.roe-hud-inspect-layout { min-height: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: var(--roe-space-4); }
.roe-hud-inspect-stage { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 48%, var(--roe-black-iron)); background: color-mix(in srgb, var(--roe-rift-navy) 22%, var(--roe-black-iron)); }
.roe-hud-inspect-figure { min-height: 0; display: grid; place-items: center; }
.roe-hud-inspect-figure svg { width: 72%; height: 72%; color: color-mix(in srgb, var(--roe-charred-oak) 70%, var(--roe-aged-bronze-bright)); }
.roe-hud-inspect-identity { display: grid; gap: var(--roe-space-1); padding: var(--roe-space-4); border-top: 1px solid var(--roe-aged-bronze); text-align: center; }
.roe-hud-inspect-identity > strong { color: var(--roe-moonbone); font: 700 21px/1.1 var(--roe-display); }
.roe-hud-inspect-identity > span { color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1.2 var(--roe-ui); }
.roe-hud-inspect-details { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--roe-space-3); overflow: hidden; }
.roe-hud-inspect-tabs { display: flex; gap: var(--roe-space-1); }
.roe-hud-inspect-panel { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: var(--roe-space-2); overflow: auto; }
.roe-hud-inspect-item { min-width: 0; min-height: 52px; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: var(--roe-space-2); padding: var(--roe-space-2); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 36%, var(--roe-black-iron)); color: var(--roe-moonbone); background: var(--roe-black-iron); font: 700 var(--roe-font-size-label)/1.2 var(--roe-ui); }
.roe-hud-inspect-item img { width: 38px; height: 38px; display: block; border-radius: var(--roe-radius-xs); object-fit: cover; }
.roe-hud-inspect-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.roe-hud-rankings {
    width: 920px;
    height: 720px;
}

.roe-hud-rankings-tabs { display: flex; justify-content: center; gap: var(--roe-space-1); padding: var(--roe-space-3) var(--roe-space-4) 0; background: var(--roe-charred-oak-deep); }
.roe-hud-rankings-tab { min-width: 140px; min-height: 44px; border: 1px solid var(--roe-aged-bronze); border-radius: var(--roe-radius-xs) var(--roe-radius-xs) 0 0; color: var(--roe-hud-text-muted); background: var(--roe-charred-oak); font: 700 var(--roe-font-size-label)/1 var(--roe-display); text-transform: uppercase; touch-action: manipulation; }
.roe-hud-rankings-tab[aria-selected='true'] { color: var(--roe-moonbone); border-color: var(--roe-rift-blue-bright); background: var(--roe-rift-navy); }
.roe-hud-rankings-tab:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; }
.roe-hud-rankings-body { min-height: 0; display: grid; grid-template-rows: 44px minmax(0, 1fr); overflow: hidden; }
.roe-hud-rankings-status { display: flex; align-items: center; justify-content: space-between; gap: var(--roe-space-3); padding: 0 var(--roe-space-4); color: var(--roe-hud-text-muted); font: var(--roe-font-size-label)/1 var(--roe-ui); }
.roe-hud-rankings-list { min-height: 0; display: grid; align-content: start; gap: var(--roe-space-1); padding: 0 var(--roe-space-3) var(--roe-space-3); overflow: auto; }
.roe-hud-ranking-row { min-width: 0; min-height: 58px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: var(--roe-space-3); padding: var(--roe-space-2) var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 34%, var(--roe-black-iron)); background: color-mix(in srgb, var(--roe-charred-oak) 60%, var(--roe-black-iron)); }
.roe-hud-ranking-row > b { color: var(--roe-hud-currency); font: 700 var(--roe-font-size-body-large)/1 var(--roe-display); font-variant-numeric: tabular-nums; text-align: center; }
.roe-hud-ranking-row > span { min-width: 0; }
.roe-hud-ranking-row strong,
.roe-hud-ranking-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-ranking-row strong { color: var(--roe-moonbone); font: 700 var(--roe-font-size-label)/1.1 var(--roe-display); }
.roe-hud-ranking-row small { margin-top: var(--roe-space-1); color: var(--roe-hud-text-muted); font: var(--roe-font-size-caption)/1 var(--roe-ui); }
.roe-hud-ranking-value { color: var(--roe-hud-success); font: 800 var(--roe-font-size-body)/1 var(--roe-ui); font-variant-numeric: tabular-nums; }

/* Returning hero landing state */

.roe-hud-returning-hero {
    width: 560px;
    height: 560px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr) auto;
    padding: var(--roe-space-3);
    overflow: visible;
}

.roe-hud-returning-hero-body {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(176px, 0.85fr);
    gap: var(--roe-space-3);
    padding: var(--roe-space-3);
    overflow: hidden;
}

.roe-hud-returning-hero-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 58%, var(--roe-black-iron));
    border-radius: var(--roe-radius-xs);
    background: url("./ui/materials/character-stage-leather.webp?v=2026-07-27-avif-1") center / cover no-repeat var(--roe-black-iron);
    box-shadow: var(--roe-shadow-hud-inset);
    isolation: isolate;
}

.roe-hud-returning-hero-canvas,
.roe-hud-returning-hero-figure {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.roe-hud-returning-hero-canvas {
    z-index: 2;
    display: block;
    opacity: 0;
    cursor: default;
    pointer-events: none;
    touch-action: none;
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out);
}

.roe-hud-returning-hero-stage[data-preview-state='ready'] .roe-hud-returning-hero-canvas {
    opacity: 1;
    cursor: grab;
    pointer-events: auto;
}

.roe-hud-returning-hero-stage[data-preview-state='ready'] .roe-hud-returning-hero-canvas:active { cursor: grabbing; }

.roe-hud-returning-hero-canvas:focus-visible {
    outline: 2px solid var(--roe-hud-focus);
    outline-offset: calc(-1 * var(--roe-space-1));
}

.roe-hud-returning-hero-figure {
    z-index: 1;
    display: grid;
    place-items: center;
    color: color-mix(in srgb, var(--roe-aged-bronze) 70%, var(--roe-charred-oak));
    transition: opacity var(--roe-motion-fast) var(--roe-ease-out);
}

.roe-hud-returning-hero-figure svg {
    width: 62%;
    height: 76%;
    display: block;
    filter: drop-shadow(0 var(--roe-space-2) var(--roe-space-3) var(--roe-black-iron));
}

.roe-hud-returning-hero-stage[data-preview-state='ready'] .roe-hud-returning-hero-figure { opacity: 0; }

.roe-hud-returning-hero-identity {
    min-width: 0;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: var(--roe-space-4);
    padding: var(--roe-space-5) var(--roe-space-4);
    border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 44%, var(--roe-black-iron));
    border-radius: var(--roe-radius-xs);
    color: var(--roe-moonbone);
    background: color-mix(in srgb, var(--roe-charred-oak-deep) 88%, var(--roe-black-iron));
    box-shadow: var(--roe-shadow-hud-inset);
    text-align: center;
}

.roe-hud-returning-hero-name {
    max-width: 100%;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--roe-moonbone);
    font: 700 28px/1.1 var(--roe-display);
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.roe-hud-returning-hero-meta {
    width: 100%;
    display: inline-grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: var(--roe-space-3);
    padding-top: var(--roe-space-3);
    border-top: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 36%, transparent);
}

.roe-hud-returning-hero-meta > b {
    color: var(--roe-ancient-gold);
    font: 800 var(--roe-font-size-body-large)/1 var(--roe-display);
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
}

.roe-hud-returning-hero-meta > span {
    position: relative;
    padding-left: var(--roe-space-3);
    color: color-mix(in srgb, var(--roe-moonbone) 72%, var(--roe-aged-bronze-bright));
    font: 800 var(--roe-font-size-label)/1.2 var(--roe-ui);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.roe-hud-returning-hero-meta > span::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 1px;
    height: var(--roe-space-4);
    background: color-mix(in srgb, var(--roe-aged-bronze) 48%, transparent);
    content: '';
    transform: translateY(-50%);
}

.roe-hud-returning-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--roe-space-2);
}

.roe-hud-returning-hero-actions .roe-hud-button {
    width: 100%;
    min-height: 52px;
}

/* Account and save ledger */

.roe-hud-ledger {
    width: 560px;
    height: 660px;
    display: grid;
    grid-template-rows: var(--roe-hud-title-height) minmax(0, 1fr) auto;
    padding: var(--roe-space-3);
    overflow: visible;
}

.roe-hud-ledger-body { min-height: 0; display: grid; align-content: start; gap: var(--roe-space-4); padding: var(--roe-space-5); overflow: auto; }
.roe-hud-ledger-copy { margin: 0; color: color-mix(in srgb, var(--roe-parchment-ink) 78%, var(--roe-aged-bronze)); font: var(--roe-font-size-body)/1.45 var(--roe-ui); text-wrap: pretty; }
.roe-hud-ledger-hero { min-width: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: var(--roe-space-3); padding: var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 44%, transparent); background: color-mix(in srgb, var(--roe-moonbone) 16%, transparent); }
.roe-hud-ledger-avatar { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid var(--roe-aged-bronze); border-radius: var(--roe-radius-xs); color: var(--roe-aged-bronze); background: color-mix(in srgb, var(--roe-aged-parchment) 56%, var(--roe-charred-oak)); font: 700 24px/1 var(--roe-display); }
.roe-hud-ledger-hero > span { min-width: 0; }
.roe-hud-ledger-hero strong,
.roe-hud-ledger-hero small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roe-hud-ledger-hero strong { color: var(--roe-parchment-ink); font: 700 var(--roe-font-size-body)/1.1 var(--roe-display); }
.roe-hud-ledger-hero small { margin-top: var(--roe-space-1); color: color-mix(in srgb, var(--roe-parchment-ink) 60%, var(--roe-aged-bronze)); font: var(--roe-font-size-caption)/1 var(--roe-ui); text-transform: uppercase; }
.roe-hud-ledger-form { display: grid; gap: var(--roe-space-3); }
.roe-hud-ledger-form > label { display: grid; gap: var(--roe-space-2); color: color-mix(in srgb, var(--roe-parchment-ink) 76%, var(--roe-aged-bronze)); font: 800 var(--roe-font-size-caption)/1 var(--roe-ui); letter-spacing: 0.7px; text-transform: uppercase; }
.roe-hud-ledger-form input { width: 100%; min-height: 44px; padding: 0 var(--roe-space-3); border: 1px solid var(--roe-aged-bronze); border-radius: var(--roe-radius-xs); color: var(--roe-moonbone); background-color: var(--roe-black-iron); font: var(--roe-font-size-body)/1 var(--roe-ui); }
.roe-hud-ledger-form input:focus-visible { outline: 2px solid var(--roe-hud-focus); outline-offset: 2px; }
.roe-hud-ledger-actions { display: grid; gap: var(--roe-space-2); }
.roe-hud-ledger-actions .roe-hud-button { width: 100%; }
.roe-hud-ledger-success { display: grid; place-items: center; align-content: center; gap: var(--roe-space-3); min-height: 300px; padding: var(--roe-space-5); text-align: center; }
.roe-hud-ledger-success > span { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--roe-hud-success); border-radius: 50%; color: var(--roe-hud-success); background: color-mix(in srgb, var(--roe-hud-success) 14%, transparent); font: 700 28px/1 var(--roe-display); }
.roe-hud-ledger-success > strong { color: var(--roe-parchment-ink); font: 700 22px/1.1 var(--roe-display); text-wrap: balance; }
.roe-hud-ledger-success > p { max-width: 360px; margin: 0; color: color-mix(in srgb, var(--roe-parchment-ink) 66%, var(--roe-aged-bronze)); font: var(--roe-font-size-label)/1.4 var(--roe-ui); text-wrap: pretty; }
.roe-hud-ledger-warning { display: flex; gap: var(--roe-space-2); padding: var(--roe-space-3); border: 1px solid color-mix(in srgb, var(--roe-hud-error) 56%, var(--roe-aged-bronze)); color: color-mix(in srgb, var(--roe-parchment-ink) 76%, var(--roe-hud-error)); background: color-mix(in srgb, var(--roe-hud-error) 10%, transparent); font: var(--roe-font-size-label)/1.4 var(--roe-ui); text-wrap: pretty; }
.roe-hud-ledger[data-mode='signed-in'] .roe-hud-ledger-form,
.roe-hud-ledger[data-mode='save-reminder'] .roe-hud-ledger-form { display: none; }
.roe-hud-ledger[data-mode='account'] .roe-hud-ledger-success,
.roe-hud-ledger[data-mode='save-reminder'] .roe-hud-ledger-success { display: none; }
.roe-hud-ledger[data-mode='account'] .roe-hud-ledger-warning,
.roe-hud-ledger[data-mode='signed-in'] .roe-hud-ledger-warning { display: none; }

@media (max-width: 900px) {
    .roe-hud-trade-offers,
    .roe-hud-profession-grid,
    .roe-hud-help-grid { grid-template-columns: minmax(0, 1fr); }
    .roe-hud-guild-layout,
    .roe-hud-map-layout,
    .roe-hud-talent-layout,
    .roe-hud-inspect-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    .roe-hud-frame > .roe-hud-close {
        top: var(--roe-space-2);
        right: var(--roe-space-2);
    }

    .roe-hud-frame:has(> .roe-hud-close) > .roe-hud-titlebar {
        padding-inline: calc(2 * var(--roe-space-7));
    }

    .roe-hud-returning-hero-body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(232px, 1fr) auto;
    }

    .roe-hud-returning-hero-identity {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        justify-items: stretch;
        gap: var(--roe-space-3);
        padding: var(--roe-space-3) var(--roe-space-4);
        text-align: left;
    }

    .roe-hud-returning-hero-name { font-size: 23px; }
    .roe-hud-returning-hero-meta {
        width: auto;
        grid-template-columns: minmax(0, 1fr);
        justify-items: end;
        gap: var(--roe-space-1);
        padding: 0 0 0 var(--roe-space-3);
        border-top: 0;
        border-left: 1px solid color-mix(in srgb, var(--roe-aged-bronze) 36%, transparent);
        text-align: right;
    }

    .roe-hud-returning-hero-meta > span { padding-left: 0; }
    .roe-hud-returning-hero-meta > span::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .roe-hud-close,
    .roe-hud-button,
    .roe-hud-slot,
    .roe-hud-icon-button {
        transition-duration: 0.01ms;
    }

    .roe-hud-scroll,
    .roe-hud-party-list,
    .roe-hud-roster-list,
    .roe-hud-codex-body,
    .roe-hud-dialogue-copy { scroll-behavior: auto; }
}
