/* r34 owner: themes-dialog-reading-scale. Compact dialog geometry and type supersede only the preserved r30 dialog presentation. */
/* r34 themes dialog shell: compact reading surface, not a second page hero. */
html.ui-typography-r34 .theme-dialog  {
    width: min(46rem, calc(100vw - 1rem));
    max-height: min(46rem, calc(100svh - 1rem));
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: clamp(1.25rem, 2.5vw, 1.75rem);
    overflow: auto;
    color: var(--text);
    background:
        radial-gradient(circle at 92% 8%, rgba(var(--signal-rgb), 0.11), transparent 16rem),
        var(--surface);
    box-shadow: 0 3rem 10rem rgba(0, 0, 0, 0.72);
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

/* r34 themes dialog typography and interaction geometry. */
html.ui-typography-r34 .theme-dialog__topbar  {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    min-height: 4.9rem;
    padding: 1.55rem 2rem 0.55rem;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    background: linear-gradient(180deg, var(--surface) 74%, rgba(12, 12, 17, 0));
}

html.ui-typography-r34 .theme-dialog__meta  {
    display: flex;
    min-width: 0;
    gap: 0.9rem;
    align-items: flex-end;
}

html.ui-typography-r34 .theme-dialog__close  {
    display: grid;
    flex: 0 0 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    margin-top: -0.15rem;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--text);
    background: rgba(255, 255, 255, 0.025);
    font-size: 1.35rem;
    line-height: 1;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

html.ui-typography-r34 .theme-dialog__close:hover  {
    border-color: var(--text);
    background: rgba(255, 255, 255, 0.075);
    transform: rotate(4deg);
}

html.ui-typography-r34 .theme-dialog__number  {
    flex: 0 0 auto;
    color: transparent;
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 4.2vw, 3.58rem);
    line-height: 0.78;
    letter-spacing: -0.06em;
    -webkit-text-stroke: 1px var(--line-strong);
}

html.ui-typography-r34 .theme-dialog__meta .eyebrow  {
    margin: 0 0 0.18rem;
    font-size: 0.67rem;
    line-height: 1.3;
}

html.ui-typography-r34 .theme-dialog h2  {
    max-width: 15ch;
    padding-inline: 2rem;
    margin: 0 0 0.75rem;
    font-size: clamp(2.25rem, 3.25vw, 2.775rem);
    line-height: 0.96;
    text-wrap: balance;
}

html.ui-typography-r34 .theme-dialog__summary  {
    max-width: 59ch;
    padding-inline: 2rem;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.25vw, 1.07rem);
    line-height: 1.55;
}

html.ui-typography-r34 .theme-dialog blockquote  {
    max-width: 59ch;
    margin: 0.9rem 2rem;
    padding: 0.65rem 0 0.65rem 1rem;
    border-left: 0.14rem solid var(--signal);
    font-size: clamp(1.08rem, 1.55vw, 1.32rem);
    font-weight: 800;
    line-height: 1.4;
}

html.ui-typography-r34 .theme-dialog__warning  {
    margin: 0 2rem 2rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(var(--dawn-rgb), 0.4);
    background: rgba(var(--dawn-rgb), 0.06);
}

html.ui-typography-r34 .theme-dialog__warning span  {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--dawn);
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

html.ui-typography-r34 .theme-dialog__warning p  {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
}

@media (max-width: 980px) {
    html.ui-typography-r34 .theme-dialog h2  {
        font-size: 2.05rem;
    }

    html.ui-typography-r34 .theme-dialog__number  {
        font-size: 2.55rem;
    }

    html.ui-typography-r34 .theme-dialog__summary  {
        font-size: 1rem;
    }

    html.ui-typography-r34 .theme-dialog blockquote  {
        font-size: 1.08rem;
    }
}

@media (max-width: 720px) {
    html.ui-typography-r34 .theme-dialog  {
        width: calc(100vw - 1rem);
        max-height: calc(100svh - 1rem);
        border-radius: 1.25rem;
        scrollbar-gutter: auto;
    }

    html.ui-typography-r34 .theme-dialog__topbar  {
        min-height: 4.2rem;
        padding: 1rem 1rem 0.4rem;
    }

    html.ui-typography-r34 .theme-dialog__meta  {
        gap: 0.7rem;
    }

    html.ui-typography-r34 .theme-dialog__number  {
        font-size: 2.6rem;
    }

    html.ui-typography-r34 .theme-dialog__meta .eyebrow  {
        max-width: 21ch;
        font-size: 0.61rem;
    }

    .theme-dialog h2,
    html.ui-typography-r34 .theme-dialog__summary  {
        padding-inline: 1rem;
    }

    html.ui-typography-r34 .theme-dialog h2  {
        margin-bottom: 0.7rem;
        font-size: 2.05rem;
    }

    html.ui-typography-r34 .theme-dialog__summary  {
        font-size: 0.9375rem;
        line-height: 1.52;
    }

    html.ui-typography-r34 .theme-dialog blockquote  {
        margin: 0.85rem 1rem;
        padding: 0.55rem 0 0.55rem 0.85rem;
        font-size: 1rem;
    }

    html.ui-typography-r34 .theme-dialog__warning  {
        margin: 0 1rem 1rem;
        padding: 0.75rem 0.85rem;
    }
}

@media (max-width: 340px) {
    html.ui-typography-r34 .theme-dialog__topbar  {
        padding-top: 0.75rem;
    }

    html.ui-typography-r34 .theme-dialog h2  {
        font-size: 1.9rem;
    }

    .theme-dialog__summary,
    html.ui-typography-r34 .theme-dialog__warning p  {
        font-size: 0.9rem;
    }

    html.ui-typography-r34 .theme-dialog blockquote  {
        font-size: 0.95rem;
    }
}
