.screensaver,
.cracktro {
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: hidden;
    border-radius: inherit;
    background: #010302;
    touch-action: none;
}

.screensaver canvas,
.cracktro canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.cracktro-exit {
    position: absolute;
    right: 8px;
    bottom: 4px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: rgba(var(--phosphor-rgb), 0.6);
    font: 11px/1 var(--font-primary);
    cursor: pointer;
}

.cracktro-exit:hover,
.cracktro-exit:focus-visible {
    color: rgb(var(--phosphor-rgb));
    outline: 1px solid rgba(var(--phosphor-rgb), 0.6);
    outline-offset: -4px;
}

.ascii-face {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    color: rgb(var(--phosphor-rgb));
}

.face-status {
    margin-bottom: 8px;
    color: rgba(var(--phosphor-rgb), 0.6);
    font: 11px/1.5 var(--font-primary);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    text-shadow: none;
}

.face-frame {
    position: relative;
    box-sizing: border-box;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 0.5em;
    border: 1px solid rgba(var(--phosphor-rgb), 0.25);
    font-family: var(--font-primary);
    font-size: 10px;
    font-weight: 400;
    font-variant-ligatures: none;
    line-height: 1;
    letter-spacing: 0;
    white-space: pre;
    color: rgb(var(--phosphor-rgb));
    text-shadow: var(--glow);
}

.face-contact {
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.face-contact span {
    color: rgba(var(--phosphor-rgb), 0.6);
}

.face-contact a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.face-source {
    position: absolute;
    left: -10000px;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.face-measure {
    position: absolute;
    visibility: hidden;
    font: inherit;
    letter-spacing: 0;
    white-space: pre;
    pointer-events: none;
}

/* DOOM */
.doom {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
}

.doom-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.72em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: none;
}

.doom-title { color: rgb(var(--phosphor-rgb)); }
.doom-status {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: rgba(var(--phosphor-rgb), 0.6);
}

.doom-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: min(340px, 62vh);
    background: #000;
    border: 1px solid rgba(var(--phosphor-rgb), 0.25);
    outline: none;
    overflow: hidden;
}

.doom-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

@media (hover: hover) {
    .doom-stage .emulator-options { display: none; }
}

.doom-hint {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.72em;
    letter-spacing: 0.08em;
    color: rgba(var(--phosphor-rgb), 0.55);
    text-shadow: none;
}
