.attempt-picture {
    margin: .9rem 0;
}

.attempt-picture button {
    display: inline-block;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: .45rem;
    background: none;
    cursor: zoom-in;
}

.attempt-picture img {
    display: block;
    max-width: 100%;
    max-height: 28rem;
    width: auto;
    height: auto;
    border-radius: .45rem;
    background: #fff;
}

html:has(.attempt-viewer[open]) {
    overflow: hidden;
}

.attempt-viewer {
    --viewer-gutter: 1rem;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: rgba(7, 9, 17, .94);
    color: var(--oz-text-primary);
}

.attempt-viewer[open] {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.attempt-viewer::backdrop {
    background: #080a12;
}

.attempt-viewer-viewport {
    overflow: auto;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y;
}

.attempt-viewer-stage {
    display: flex;
    width: max-content;
    min-width: 100%;
    min-height: 100%;
    padding: var(--viewer-gutter);
    justify-content: center;
    align-items: center;
}

.attempt-viewer-image {
    flex: none;
    max-width: none;
    height: auto;
    border-radius: .35rem;
    background: #fff;
    user-select: none;
}

.attempt-viewer-image[data-zoomed] {
    cursor: grab;
}

.attempt-viewer-image:active[data-zoomed] {
    cursor: grabbing;
}

.attempt-viewer-close,
.attempt-viewer-controls :is(button, a) {
    display: grid;
    min-width: 2.75rem;
    min-height: 2.75rem;
    place-items: center;
    padding: .2rem .65rem;
    border: 1px solid #45405a;
    border-radius: .65rem;
    background: #1a192b;
    color: inherit;
    font: 750 1.25rem/1 var(--oz-font-body);
    cursor: pointer;
}

.attempt-viewer-close {
    position: absolute;
    z-index: 1;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    font-size: 1.8rem;
}

.attempt-viewer-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem .85rem;
    padding: .55rem .45rem max(.65rem, env(safe-area-inset-bottom));
}

.attempt-viewer-controls {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.attempt-viewer-controls[hidden],
.attempt-viewer-controls [hidden] {
    display: none;
}

.attempt-viewer-controls :is(a, [data-export-page]) {
    font-size: .9rem;
}

.attempt-viewer-controls [data-export-page] {
    min-width: 3.5rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.attempt-viewer-controls a {
    white-space: nowrap;
    text-decoration: none;
}

.attempt-viewer-controls [data-zoom='fit'] {
    min-width: 4.5rem;
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
}

.attempt-viewer :is(button:enabled, a):hover {
    background: #30284a;
}

.attempt-viewer :is(button, a):focus-visible {
    outline: 2px solid var(--probnik-accent);
    outline-offset: 2px;
}

.attempt-viewer-controls button:disabled {
    color: #8992a8;
    cursor: default;
}

.attempt-choices {
    margin: .8rem 0 0;
    padding-left: 1.6rem;
}
