body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    box-sizing: border-box;
    background: #151515;
    color: #c5c5c5;
    font-family: Consolas, "Courier New", monospace;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.25rem 1.5rem;
}

.site-header .help-button {
    width: 2rem;
    height: 2rem;
    margin-left: auto;
    padding: 0;
    border-radius: 50%;
    font-weight: bold;
}

.site-header img {
    width: 2rem;
    height: 2rem;
}

.site-header h1 {
    margin: 0;
    color: #e0e0e0;
    font-size: 1.25rem;
    letter-spacing: 0.08em;
}

video {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

main {
    display: flex;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

button {
    padding: 0.45rem 0.8rem;
    border: 1px solid #666;
    border-radius: 2px;
    background: #444;
    color: #eee;
    font: inherit;
    cursor: pointer;
}

button:hover {
    background: #555;
}

button:focus-visible {
    outline: 2px solid #aaa;
    outline-offset: 2px;
}

.controls label {
    margin-left: 0.25rem;
}

.controls select {
    padding: 0.45rem 0.6rem;
    border: 1px solid #666;
    border-radius: 2px;
    background: #333;
    color: #eee;
    font: inherit;
}

.controls select:focus-visible {
    outline: 2px solid #aaa;
    outline-offset: 2px;
}

dialog {
    width: min(28rem, calc(100% - 3rem));
    box-sizing: border-box;
    padding: 1.25rem;
    border: 1px solid #666;
    border-radius: 4px;
    background: #202020;
    color: #c5c5c5;
    font: inherit;
    line-height: 1.5;
}

dialog::backdrop {
    background: rgb(0 0 0 / 65%);
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dialog-header h2,
dialog h3 {
    color: #eee;
}

.dialog-header h2 {
    margin: 0;
}

.dialog-header button {
    padding: 0.15rem 0.55rem;
    font-size: 1.2rem;
}

dialog li + li {
    margin-top: 0.35rem;
}

#ascii-output {
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0;
    margin: 1rem 0 0;
    background: #151515;
    color: #bdbdbd;
    font-family: monospace;
    font-size: clamp(4px, 0.9vw, 6px);
    letter-spacing: 0.12em;
    line-height: 1.15;
    white-space: pre;
    overflow-x: auto;
}

#ascii-output[data-quality="medium"] {
    font-size: clamp(5.34px, 1.2vw, 8px);
}

#ascii-output[data-quality="low"] {
    font-size: clamp(8px, 1.8vw, 12px);
}