.prompt-test-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(20px, 4vw, 64px);
    align-items: center;
    padding: 16px clamp(18px, 5vw, 64px);
    border-bottom: 4px solid var(--line);
    background: var(--mint);
}

.prompt-test-hero-copy {
    max-width: 1080px;
}

.prompt-test-hero h1 {
    max-width: 980px;
    margin: 7px 0 4px;
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.25;
    text-transform: uppercase;
}

.prompt-test-hero p {
    max-width: 980px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    font-weight: 750;
    line-height: 1.35;
}

.prompt-test-hero-number {
    display: flex;
    width: auto;
    align-items: center;
    gap: 10px;
    padding-left: 18px;
    border-left: 4px solid var(--line);
}

.prompt-test-hero-number strong {
    font-size: 2.4rem;
    line-height: 1;
}

.prompt-test-hero-number span {
    max-width: 95px;
    margin-top: 0;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
}

.prompt-test-browser {
    padding: clamp(30px, 4vw, 56px) clamp(18px, 5vw, 64px) 36px;
}

.prompt-test-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 28px;
    align-items: end;
    margin-bottom: 24px;
}

.prompt-test-toolbar h2 {
    margin: 9px 0 0;
    font-size: clamp(2rem, 4vw, 4.4rem);
    line-height: 0.95;
    text-transform: uppercase;
}

.prompt-test-search label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    font-weight: 950;
    text-transform: uppercase;
}

.prompt-test-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.prompt-test-search input,
.prompt-test-search button {
    min-height: 48px;
    border: 3px solid var(--line);
    border-radius: 6px;
}

.prompt-test-search input {
    min-width: 0;
    padding: 10px 14px;
    background: #ffffff;
    font-weight: 750;
}

.prompt-test-search button {
    padding: 0 20px;
    background: var(--yellow);
    font-weight: 950;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--line);
}

.prompt-test-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding-top: 16px;
    border-top: 3px solid var(--line);
    font-size: 0.9rem;
    font-weight: 850;
}

.prompt-test-results-head p {
    margin: 0;
}

.prompt-test-results-head a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.prompt-test-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(12px, 1.6vw, 24px);
}

.prompt-test-card {
    position: relative;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 3px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    box-shadow: 6px 6px 0 var(--line);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.prompt-test-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 0 solid var(--prompt-card-accent);
    pointer-events: none;
    transition: border-width 180ms ease;
}

.prompt-test-card:hover,
.prompt-test-card:focus-visible {
    z-index: 2;
    transform: translateY(-8px);
    box-shadow: 10px 14px 0 var(--line);
    outline: none;
}

.prompt-test-card:hover::after,
.prompt-test-card:focus-visible::after {
    border-width: 7px;
}

.prompt-test-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 260ms ease;
}

.prompt-test-card:hover img,
.prompt-test-card:focus-visible img {
    transform: scale(1.045);
}

.prompt-test-card-label {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    padding: 8px 10px;
    border: 3px solid var(--line);
    border-radius: 6px;
    background: var(--prompt-card-accent);
    box-shadow: 4px 4px 0 var(--line);
}

.prompt-test-card-label strong {
    min-width: 0;
    font-size: clamp(0.8rem, 1.1vw, 1rem);
    line-height: 1.05;
    text-transform: uppercase;
}

.prompt-test-card-label small {
    flex: 0 0 auto;
    font-size: 0.7rem;
    font-weight: 900;
    white-space: nowrap;
}

.prompt-test-dialog {
    width: min(1060px, calc(100vw - 32px));
    max-height: min(820px, calc(100vh - 32px));
    padding: 0;
    overflow: visible;
    border: 4px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 12px 12px 0 var(--line);
}

.prompt-test-dialog::backdrop {
    background: rgba(17, 17, 17, 0.76);
}

.prompt-test-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 3px solid var(--line);
    border-radius: 50%;
    background: var(--yellow);
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--line);
}

.prompt-test-dialog-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.prompt-test-dialog figure {
    min-height: 100%;
    margin: 0;
    border-right: 4px solid var(--line);
    background: var(--ink);
}

.prompt-test-dialog figure img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 560px;
    object-fit: cover;
}

.prompt-test-dialog-content {
    align-self: center;
    padding: clamp(28px, 4vw, 58px);
}

.prompt-test-dialog-content h2 {
    margin: 12px 0 20px;
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 0.9;
    text-transform: uppercase;
}

.prompt-test-full-text {
    max-height: 330px;
    margin: 0 0 22px;
    padding-right: 10px;
    overflow-y: auto;
    color: #38332d;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.55;
}

.prompt-test-locked {
    padding: 20px;
    border: 3px solid var(--line);
    border-radius: 8px;
    background: var(--mint);
}

.prompt-test-locked strong {
    display: block;
    font-size: 1.25rem;
}

.prompt-test-locked p {
    margin: 8px 0 18px;
    color: var(--muted);
    font-weight: 750;
    line-height: 1.45;
}

.prompt-test-empty {
    padding: clamp(42px, 8vw, 100px) 20px;
    border: 3px solid var(--line);
    border-radius: 8px;
    background: var(--cream);
    text-align: center;
}

.prompt-test-empty h3 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 3.6rem);
    text-transform: uppercase;
}

.prompt-test-empty p {
    margin: 0 0 22px;
    color: var(--muted);
    font-weight: 750;
}

.prompt-test-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    padding: 0 clamp(18px, 5vw, 64px) 70px;
}

.prompt-test-pagination > a,
.prompt-test-pagination div a,
.prompt-test-pagination div span {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 3px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    font-weight: 950;
    box-shadow: 4px 4px 0 var(--line);
}

.prompt-test-pagination > a:last-child {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

.prompt-test-pagination div {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
}

.prompt-test-pagination > a:first-child {
    grid-column: 1;
    grid-row: 1;
}

.prompt-test-pagination div span {
    background: var(--yellow);
}

@media (max-width: 1320px) {
    .prompt-test-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .prompt-test-toolbar {
        grid-template-columns: 1fr;
    }

    .prompt-test-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .prompt-test-hero {
        grid-template-columns: 1fr;
        gap: 10px;
        padding-block: 14px;
    }

    .prompt-test-hero h1 {
        font-size: 1rem;
    }

    .prompt-test-hero-number {
        padding: 9px 0 0;
        border-top: 3px solid var(--line);
        border-left: 0;
    }

    .prompt-test-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prompt-test-dialog-layout {
        grid-template-columns: 1fr;
    }

    .prompt-test-dialog figure {
        min-height: 0;
        border-right: 0;
        border-bottom: 4px solid var(--line);
    }

    .prompt-test-dialog figure img {
        height: min(54vh, 520px);
        min-height: 0;
    }

    .prompt-test-dialog-content {
        padding: 26px 20px;
    }

    .prompt-test-dialog-content h2 {
        padding-right: 42px;
        font-size: clamp(2rem, 12vw, 4rem);
    }

    .prompt-test-pagination {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .prompt-test-pagination > a:last-child {
        grid-column: 1;
        grid-row: auto;
        justify-self: center;
    }

    .prompt-test-pagination > a:first-child,
    .prompt-test-pagination div {
        grid-column: 1;
        grid-row: auto;
    }
}

@media (max-width: 480px) {
    .prompt-test-browser {
        padding-inline: 12px;
    }

    .prompt-test-search-row {
        grid-template-columns: 1fr;
    }

    .prompt-test-results-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .prompt-test-grid {
        gap: 10px;
    }

    .prompt-test-card {
        box-shadow: 4px 4px 0 var(--line);
    }

    .prompt-test-card-label {
        right: 6px;
        bottom: 6px;
        left: 6px;
        display: block;
        min-height: 44px;
        padding: 7px;
        box-shadow: 3px 3px 0 var(--line);
    }

    .prompt-test-card-label strong {
        display: block;
        font-size: 0.72rem;
    }

    .prompt-test-card-label small {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .prompt-test-card,
    .prompt-test-card img,
    .prompt-test-card::after {
        transition: none;
    }
}

.prompt-test-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.prompt-test-dialog-actions .primary-button,
.prompt-test-dialog-actions .secondary-button {
    min-height: 46px;
}

.prompt-test-load-more-wrap {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 42px 0 14px;
}

.prompt-test-load-more {
    display: inline-flex;
    min-width: min(100%, 310px);
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: 3px solid var(--line);
    border-radius: 6px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 950;
    box-shadow: 5px 5px 0 var(--line);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.prompt-test-load-more:hover,
.prompt-test-load-more:focus-visible {
    transform: translateY(-3px);
    box-shadow: 8px 9px 0 var(--line);
    outline: none;
}

.prompt-test-load-more[data-loading="1"] {
    cursor: wait;
    opacity: 0.72;
}

.prompt-test-load-more-wrap small {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 850;
}

@media (max-width: 720px) {
    .prompt-test-dialog-actions {
        display: grid;
    }

    .prompt-test-dialog-actions .primary-button,
    .prompt-test-dialog-actions .secondary-button {
        width: 100%;
    }

    .prompt-test-load-more-wrap {
        padding-top: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .prompt-test-load-more {
        transition: none;
    }
}
