.duel-page {
    position: relative;
}

#lobbyScreen {
    position: relative;
    isolation: isolate;
}

.duel-field-rings {
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 48%;
    width: min(68vw, 780px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.duel-field-rings i {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(65, 105, 232, .07);
    border-radius: 50%;
    transform: rotate(-1.5deg);
}

.duel-field-rings i:nth-child(2) {
    inset: 15%;
    border-color: rgba(65, 105, 232, .085);
    transform: rotate(1deg);
}

.duel-field-rings i:nth-child(3) {
    inset: 32%;
    border-color: rgba(65, 105, 232, .1);
    transform: rotate(-2deg);
}

.duel-field-rings i::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -3px;
    width: 5px;
    height: 5px;
    border: 1px solid rgba(65, 105, 232, .18);
    border-radius: 50%;
    background: var(--paper);
}

.duel-lobby-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lobbyScreen .duel-rank {
    margin: 0;
}

#lobbyScreen .duel-rank .rank-badge svg {
    width: 82px;
    height: 82px;
}

#lobbyScreen .duel-rank .rank-badge span {
    display: block;
}

.duel-signal {
    --crest-color: #a96f45;
    position: relative;
    width: min(72vw, 760px);
    height: 220px;
    display: grid;
    place-items: center;
    color: var(--crest-color);
}

.duel-signal.crest-silver { --crest-color: #8796a6; }
.duel-signal.crest-gold { --crest-color: #c79422; }

.duel-signal-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(65,105,232,.7) 12%, var(--blue) 42%, var(--blue) 58%, rgba(65,105,232,.7) 88%, transparent);
    transform: translateY(-50%) rotate(-.25deg);
}

.duel-signal-ring {
    position: relative;
    z-index: 2;
    display: grid;
    width: 190px;
    height: 190px;
    place-items: center;
    border: 3px solid var(--blue);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 0 0 7px var(--paper);
}

.duel-signal-ring::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(65,105,232,.25);
    border-radius: 50%;
    transform: rotate(-2deg);
}

.duel-signal .rank-badge {
    position: relative;
    z-index: 1;
}


#lobbyScreen .eyebrow {
    margin-bottom: 22px;
}

#lobbyScreen h1 {
    font-family: "Space Mono", monospace;
    font-size: clamp(48px, 5.5vw, 76px);
    font-weight: 700;
    letter-spacing: .14em;
    text-indent: .14em;
}

.duel-scoreboard {
    border-block: 0;
}

.duel-scoreboard > div + div {
    border-left: 0;
}

/* A clean wordmark with a second, imperfect pencil pass around each letter. */
#lobbyScreen .duel-sketch-title {
    display: flex;
    width: auto;
    height: auto;
    align-items: baseline;
    gap: .04em;
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    font-size: clamp(50px, 5.7vw, 76px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: .12em;
    text-indent: .12em;
}

.duel-sketch-title span {
    position: relative;
    display: inline-block;
    -webkit-text-stroke: .35px currentColor;
    text-shadow: .7px .5px 0 color-mix(in srgb, var(--blue) 18%, transparent);
}

.duel-sketch-title span::after {
    content: attr(data-letter);
    position: absolute;
    z-index: -1;
    inset: 0;
    color: transparent;
    -webkit-text-stroke: .65px color-mix(in srgb, var(--blue) 42%, transparent);
    transform: translate(1.4px, -.7px) rotate(.7deg);
}

.duel-sketch-title span:nth-child(1) { transform: rotate(-.7deg) translateY(.8px); }
.duel-sketch-title span:nth-child(2) { transform: rotate(.45deg) translateY(-.5px); }
.duel-sketch-title span:nth-child(3) { transform: rotate(-.35deg) translateY(.35px); }
.duel-sketch-title span:nth-child(4) { transform: rotate(.55deg) translateY(.7px); }
.duel-sketch-title span:nth-child(even)::after { transform: translate(-1px, .8px) rotate(-.6deg); }

#lobbyScreen.is-matching .duel-lobby-content h1 {
    color: var(--ink);
    transition: none;
}

@media (max-width: 650px) {
    .duel-field-rings { width: 125vw; }
    .duel-signal { width: min(88vw, 560px); height: 174px; }
    .duel-signal-ring { width: 148px; height: 148px; }
    #lobbyScreen .duel-rank .rank-badge svg { width: 64px; height: 64px; }
}
