/*
 * Resource page, /resources/{slug}/. Drawn at 1920 only (740 plus 560
 * columns in a 1360 container). Below 1200 the columns stack, gallery
 * first, in one centred column. Shared pieces (buttons, stars, ribbons,
 * modals) are in modals.css.
 */

.sr-detail {
    padding: 32px max(40px, env(safe-area-inset-right, 0px)) 120px max(40px, env(safe-area-inset-left, 0px));
    background: #fff;
    color: var(--sr-x-body);
    font-family: var(--sr-x-body-font);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.sr-detail__inner {
    max-width: 1360px;
    margin: 0 auto;
}
.sr-detail :where(p, ul, ol, dl, dd, h1, h2, h3) {
    margin: 0;
    padding: 0;
}
.sr-detail :where(ul, ol) {
    list-style: none;
}
.sr-detail :where(img) {
    max-width: 100%;
    height: auto;
}
.sr-detail :where(a) {
    text-decoration: none;
}

/* Two columns */
.sr-detail__top {
    display: grid;
    grid-template-columns: minmax(0, 740fr) minmax(0, 560fr);
    gap: 60px;
    align-items: start;
    margin-top: 24px;
}

/* Gallery: rail on the left, square image on the right. */
.sr-gallery {
    position: relative;
    min-width: 0;
}
.sr-gallery--many {
    padding-left: 140px;
}
/* One picture: no rail, so the image fills the whole column (Paul, 24 Nov:
   an empty rail's width beside a lone picture looked odd). */
.sr-gallery__rail {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.sr-detail:not(#sr-x) .sr-gallery__thumb {
    position: relative;
    flex: none;
    width: 120px;
    height: 120px;
    margin: 0;
    padding: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 16px;
    background: var(--sr-x-bg-light);
    box-shadow: none;
    cursor: pointer;
}
.sr-detail:not(#sr-x) .sr-gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.sr-detail:not(#sr-x) .sr-gallery__thumb:hover {
    border-color: var(--sr-x-border);
    background: var(--sr-x-bg-light);
}
.sr-detail:not(#sr-x) .sr-gallery__thumb[aria-selected="true"] {
    border-color: var(--sr-x-green);
}
.sr-detail:not(#sr-x) .sr-gallery__thumb:focus-visible {
    outline: 3px solid var(--sr-x-focus);
    outline-offset: -3px;
}
.sr-gallery__stage {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 32px;
    background: var(--sr-x-bg-light);
    touch-action: pan-y;
}
.sr-gallery__stage:focus-visible {
    outline: 3px solid var(--sr-x-focus);
    outline-offset: 3px;
}
.sr-detail:not(#sr-x) .sr-gallery__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    padding: 40px;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}
.sr-detail:not(#sr-x) .sr-gallery__image[hidden] {
    display: none;
}
.sr-detail:not(#sr-x) .sr-gallery__image--placeholder {
    padding: 22%;
    opacity: 0.9;
}
.sr-detail:not(#sr-x) .sr-gallery__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: -24px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    color: var(--sr-x-green);
    cursor: pointer;
    transition: background-color 150ms ease;
}
.sr-detail:not(#sr-x) .sr-gallery__arrow--prev { left: 10px; }
.sr-detail:not(#sr-x) .sr-gallery__arrow--next { right: 10px; }
.sr-detail:not(#sr-x) .sr-gallery__arrow:hover {
    background: #F4FAED;
    color: var(--sr-x-green-active);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.sr-detail:not(#sr-x) .sr-gallery__arrow:active {
    background: #E6F3D6;
    color: var(--sr-x-green-active);
}
.sr-gallery__count {
    position: absolute;
    bottom: 12px;
    left: 50%;
    display: none;
    padding: 2px 10px;
    border-radius: 100px;
    background: rgba(0, 73, 116, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transform: translateX(-50%);
}

/* Info column */
.sr-detail__info {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}
.sr-detail__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sr-detail__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.sr-detail:not(#sr-x) .sr-detail__title {
    min-width: 0;
    color: var(--sr-x-heading);
    font-family: var(--sr-x-head-font);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}
.sr-detail:not(#sr-x) .sr-save-btn {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 4px 0 0;
    padding: 0;
    border: 1px solid var(--sr-x-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: var(--sr-x-light);
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease;
}
.sr-detail:not(#sr-x) .sr-save-btn svg {
    fill: none;
}
.sr-detail:not(#sr-x) .sr-save-btn:hover {
    border-color: var(--sr-x-sky);
    background: #fff;
    color: var(--sr-x-sky);
}
.sr-detail:not(#sr-x) .sr-save-btn:active {
    border-color: var(--sr-x-blue);
    background: var(--sr-x-sky-bg);
    color: var(--sr-x-blue);
}
.sr-detail:not(#sr-x) .sr-save-btn[class]:focus-visible {
    outline: 3px solid var(--sr-x-focus);
    outline-offset: 2px;
}
.sr-detail:not(#sr-x) .sr-save-btn.is-saved {
    color: var(--sr-x-sky);
}
.sr-detail:not(#sr-x) .sr-save-btn.is-saved svg {
    fill: currentColor;
}
.sr-detail__rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    line-height: 1;
}
.sr-detail__score {
    margin-left: 4px;
}
.sr-detail__rating .sr-link {
    line-height: 1.4;
}
.sr-detail__posted {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    color: var(--sr-x-light);
    font-size: 14px;
}
.sr-detail__summary {
    font-size: 16px;
    line-height: 1.5;
}

/* Tags link to the matching browse filter. */
.sr-detail__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 12px;
}
.sr-detail:not(#sr-x) .sr-dtag,
.sr-detail:not(#sr-x) .sr-dtag:visited {
    display: inline-block;
    padding: 12px 16px;
    border: 1px solid var(--sr-x-border);
    border-radius: 100px;
    background: #fff;
    color: #73787C;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}
.sr-detail:not(#sr-x) .sr-dtag:hover {
    border-color: var(--sr-x-blue);
    background: var(--sr-x-sky-bg);
    color: var(--sr-x-blue);
}
.sr-detail:not(#sr-x) .sr-dtag:active {
    background: #D6EEFA;
    color: var(--sr-x-blue-active);
}

/* File details */
.sr-detail__specs {
    display: flex;
    flex-wrap: wrap;
    /* Fixed 75 px columns 46 px apart: five fill the 560 px column exactly,
       and three or four keep the same rhythm instead of spreading out. */
    justify-content: flex-start;
    gap: 16px 46px;
    padding: 32px 0;
    border-top: 1px solid var(--sr-x-border);
    border-bottom: 1px solid var(--sr-x-border);
}
.sr-spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 75px;
    text-align: center;
}
.sr-spec dt {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}
.sr-detail:not(#sr-x) .sr-spec dd {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}
.sr-spec img {
    display: block;
    width: 32px;
    height: 32px;
}

/* Book and Journey2Jannah cards */
.sr-detail__promos {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sr-detail:not(#sr-x) .sr-promo,
.sr-detail:not(#sr-x) .sr-promo:visited {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 100px;
    padding: 16px;
    border-radius: 16px;
    background: var(--sr-x-sky-bg);
    color: var(--sr-x-body);
}
.sr-detail:not(#sr-x) .sr-promo--j2j {
    background: var(--sr-x-purple-bg);
}
.sr-promo__tile {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}
.sr-promo__text {
    font-size: 16px;
    line-height: 1.5;
}
.sr-promo__link {
    display: block;
    color: var(--sr-x-blue);
}
.sr-detail:not(#sr-x) .sr-promo:hover .sr-promo__link {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.sr-detail:not(#sr-x) .sr-promo:focus-visible {
    outline: 3px solid var(--sr-x-focus);
    outline-offset: 2px;
}

/* Download Now and Share */
.sr-detail__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Said before the tap: a download that opens on the old site or in a tab. */
.sr-detail__dl-note {
    grid-row: 2;
    grid-column: 1;
    margin: -8px 0 0;
    color: var(--sr-x-body);
    font-size: 14px;
    line-height: 1.5;
}

/* Several files */
.sr-detail__files {
    margin-top: -8px;
    padding: 8px 20px;
    border: 1px solid var(--sr-x-border);
    border-radius: 16px;
}
.sr-detail:not(#sr-x) .sr-detail__files-title {
    padding: 12px 0;
    color: var(--sr-x-heading);
    font-family: var(--sr-x-body-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}
.sr-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--sr-x-card-border);
}
.sr-file__icon {
    display: flex;
    flex: none;
    color: var(--sr-x-blue);
}
.sr-file__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}
.sr-file__name {
    overflow: hidden;
    color: var(--sr-x-body);
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sr-file__meta {
    color: var(--sr-x-light);
    font-size: 12px;
}
.sr-detail:not(#sr-x) .sr-file__download,
.sr-detail:not(#sr-x) .sr-file__download:visited {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--sr-x-blue);
    border-radius: 100px;
    background: #fff;
    color: var(--sr-x-blue);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}
.sr-detail:not(#sr-x) .sr-file__download svg {
    width: 14px;
    height: 14px;
}
.sr-detail:not(#sr-x) .sr-file__download:hover {
    background: var(--sr-x-sky-bg);
    color: var(--sr-x-blue);
}
.sr-detail:not(#sr-x) .sr-file__download:active {
    background: #D6EEFA;
    color: var(--sr-x-blue-active);
}

/* Accordions */
.sr-accordions {
    border-top: 1px solid var(--sr-x-border);
}
.sr-accordion {
    border-bottom: 1px solid var(--sr-x-border);
}
.sr-detail:not(#sr-x) .sr-accordion > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    list-style: none;
    color: var(--sr-x-heading);
    cursor: pointer;
}
.sr-accordion > summary::-webkit-details-marker {
    display: none;
}
.sr-accordion > summary::marker {
    content: "";
}
.sr-accordion__title {
    font-family: var(--sr-x-head-font);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}
.sr-accordion__icon {
    display: flex;
    color: var(--sr-x-light);
    transition: color 150ms ease;
}
.sr-detail:not(#sr-x) .sr-accordion > summary:hover .sr-accordion__icon {
    color: var(--sr-x-blue);
}
.sr-accordion[open] .sr-icon-plus__v {
    opacity: 0;
}
.sr-detail:not(#sr-x) .sr-accordion > summary:focus-visible {
    outline-offset: 4px;
}
.sr-accordion__body {
    padding: 0 0 32px;
}
.sr-detail__description p,
.sr-detail__description li {
    margin-bottom: 16px;
}
.sr-detail__description > :last-child {
    margin-bottom: 0;
}
.sr-detail__description strong {
    color: var(--sr-x-body);
    font-weight: 700;
}
.sr-detail__description .sr-q {
    font-weight: 600;
}
.sr-detail__description p.sr-q {
    margin-bottom: 8px;
}

/* Reviews */
.sr-reviews__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 16px;
}
.sr-reviews__score strong {
    font-weight: 600;
}
.sr-reviews__count {
    color: var(--sr-x-blue);
    font-weight: 500;
}
.sr-reviews__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 32px 0 16px;
}
.sr-detail:not(#sr-x) .sr-reviews__title {
    color: var(--sr-x-heading);
    font-family: var(--sr-x-body-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}
.sr-reviews__sort {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--sr-x-body);
    font-size: 16px;
    font-weight: 600;
}
.sr-select {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.sr-detail:not(#sr-x) .sr-select select {
    width: 200px;
    height: auto;
    margin: 0;
    padding: 10px 40px 10px 16px;
    border: 1px solid var(--sr-x-card-border);
    border-radius: 100px;
    background: #fff;
    box-shadow: none;
    color: var(--sr-x-body);
    font-family: var(--sr-x-body-font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.sr-detail:not(#sr-x) .sr-select select:hover {
    border-color: var(--sr-x-border);
    background: var(--sr-x-bg-light);
}
.sr-select svg {
    position: absolute;
    right: 16px;
    color: var(--sr-x-body);
    pointer-events: none;
}
.sr-reviews__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.sr-review {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--sr-x-border);
    border-radius: 16px;
}
.sr-review:focus {
    outline: none;
}
.sr-review__text {
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.sr-review__name {
    color: var(--sr-x-heading);
    font-size: 15px;
    font-weight: 600;
}
.sr-review__date {
    color: var(--sr-x-light);
    font-size: 14px;
}
.sr-reviews__empty,
.sr-reviews__write {
    margin-top: 16px;
    font-size: 15px;
}
.sr-reviews__more {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}
.sr-reviews__more [hidden] {
    display: none;
}

/* Sections below the top block */
.sr-detail__section,
.sr-detail__inner > :is(.sr-other, .sr-band, .sr-more-ways) {
    margin-top: 80px;
}
.sr-detail__related {
    padding-top: 80px;
    border-top: 1px solid var(--sr-x-border);
}
.sr-detail:not(#sr-x) .sr-detail__h2 {
    margin-bottom: 32px;
    color: var(--sr-x-heading);
    font-family: var(--sr-x-head-font);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
}
.sr-detail__cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* Leave a Review */
.sr-review-form .sr-detail__h2 {
    margin-bottom: 40px;
}
.sr-review-form:not(#sr-x) .sr-detail__h2 {
    text-align: center;
}
.sr-review-form__form,
.sr-review-form__done {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.sr-review-form__form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.sr-review-form__error {
    padding: 12px 16px;
    border-radius: 8px;
    background: #FDEFF1;
    color: var(--sr-x-red);
    font-size: 14px;
    font-weight: 500;
}
.sr-review-form__error[hidden],
.sr-review-form__done[hidden] {
    display: none;
}
.sr-detail:not(#sr-x) .sr-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.sr-detail:not(#sr-x) .sr-field > label,
.sr-detail:not(#sr-x) .sr-field > legend {
    padding: 0;
    color: var(--sr-x-body);
    font-family: var(--sr-x-body-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}
.sr-req {
    margin-left: 4px;
    color: var(--sr-x-required);
}
.sr-detail:not(#sr-x) .sr-field input[type="text"],
.sr-detail:not(#sr-x) .sr-field textarea {
    display: block;
    width: 100%;
    max-width: none;
    height: 48px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid rgba(85, 86, 102, 0.25);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: var(--sr-x-body);
    font-family: var(--sr-x-body-font);
    font-size: 16px;
    line-height: 1.5;
}
.sr-detail:not(#sr-x) .sr-field textarea {
    height: 200px;
    resize: vertical;
}
.sr-detail:not(#sr-x) .sr-field :is(input, textarea)::placeholder {
    color: var(--sr-x-body);
    opacity: 0.5;
}
.sr-detail:not(#sr-x) .sr-field :is(input, textarea):focus {
    border-color: var(--sr-x-sky);
    outline: none;
    box-shadow: 0 0 0 3px rgba(47, 174, 219, 0.25);
}
.sr-detail:not(#sr-x) .sr-field.has-error :is(input, textarea) {
    border-color: var(--sr-x-red);
}
.sr-field__error {
    color: var(--sr-x-red);
    font-size: 14px;
    font-weight: 500;
}
.sr-field__error[hidden] {
    display: none;
}

/* Star input: five radios drawn as stars, filled up to the one chosen. */
.sr-detail:not(#sr-x) .sr-stars-input {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}
.sr-detail:not(#sr-x) .sr-stars-input > legend {
    float: left;
    line-height: 36px;
}
.sr-stars-input__row {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}
.sr-detail:not(#sr-x) .sr-stars-input input {
    position: absolute;
    appearance: none;
    padding: 0;
    border: 0;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.sr-detail:not(#sr-x) .sr-stars-input label {
    display: flex;
    width: auto;
    margin: 0;
    padding: 2px;
    border-radius: 6px;
    cursor: pointer;
}
.sr-stars-input svg {
    display: block;
    fill: #E8E9EA;
    transition: fill 100ms ease, transform 100ms ease;
}
.sr-stars-input__row:hover label svg {
    fill: #E8E9EA;
}
.sr-stars-input__row label:hover svg,
.sr-stars-input__row label:hover ~ label svg,
.sr-stars-input input:checked ~ label svg,
.sr-stars-input__row:not(:hover) input:checked ~ label svg {
    fill: var(--sr-x-star);
}
.sr-stars-input__row label:hover svg {
    transform: scale(1.08);
}
.sr-stars-input input:focus-visible + label {
    outline: 3px solid var(--sr-x-focus);
    outline-offset: 0;
}
.sr-stars-input .sr-field__error {
    flex-basis: 100%;
}

.sr-review-form__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
}
.sr-review-form__note {
    color: var(--sr-x-light);
    font-size: 14px;
}
.sr-review-form__foot .sr-pbtn {
    min-width: 270px;
}
.sr-review-form__done {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: 16px;
    background: #F4FAED;
}
.sr-review-form__done:focus {
    outline: none;
}
.sr-detail:not(#sr-x) .sr-review-form__done-title {
    color: var(--sr-x-heading);
    font-family: var(--sr-x-head-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}
.sr-review-form__mine {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
}

/* ---------------------------------------------------------------
   Narrower screens. No frame exists below 1920.
   --------------------------------------------------------------- */

@media (max-width: 1439px) {
    .sr-detail__specs {
        column-gap: 24px;
    }
    .sr-detail__top {
        gap: 48px;
    }
    .sr-detail:not(#sr-x) .sr-detail__title {
        font-size: 36px;
    }
}

/* One column: gallery first, then the title block and actions. */
@media (max-width: 1199px) {
    .sr-detail {
        padding-left: max(32px, env(safe-area-inset-left, 0px));
        padding-right: max(32px, env(safe-area-inset-right, 0px));
    }
    .sr-crumbs,
    .sr-detail__top {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    .sr-detail__top {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
    .sr-gallery--many {
        padding-left: 0;
    }
    .sr-gallery__rail {
        position: static;
        flex-direction: row;
        width: auto;
        margin-top: 12px;
        padding: 2px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .sr-gallery--many .sr-gallery__rail {
        order: 2;
    }
    .sr-gallery--many {
        display: flex;
        flex-direction: column;
    }
    .sr-detail:not(#sr-x) .sr-gallery__thumb {
        width: 88px;
        height: 88px;
        border-radius: 12px;
    }
    .sr-gallery__stage {
        aspect-ratio: 4 / 3;
        border-radius: 24px;
    }
    .sr-detail__cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .sr-detail__cards > :nth-child(4) {
        display: none;
    }
}

@media (max-width: 1023px) {
    .sr-detail__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sr-detail__cards > :nth-child(4) {
        display: block;
    }
}

@media (max-width: 767px) {
    .sr-detail {
        padding: 16px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px));
    }
    .sr-detail__top {
        margin-top: 16px;
        gap: 28px;
    }
    .sr-detail__info {
        gap: 24px;
    }
    .sr-detail:not(#sr-x) .sr-detail__title {
        font-size: 28px;
    }
    .sr-detail:not(#sr-x) .sr-gallery__image {
        padding: 16px;
    }
    .sr-detail:not(#sr-x) .sr-gallery__arrow {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }
    .sr-gallery--many .sr-gallery__count {
        display: block;
    }
    .sr-detail:not(#sr-x) .sr-gallery__thumb {
        width: 64px;
        height: 64px;
        padding: 4px;
        border-radius: 10px;
    }
    .sr-detail__specs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        padding: 24px 0;
    }
    .sr-spec {
        min-width: 0;
    }
    .sr-detail__actions {
        grid-template-columns: minmax(0, 1fr);
    }
    .sr-detail:not(#sr-x) .sr-dtag {
        padding: 10px 14px;
    }
    .sr-detail__tags {
        gap: 10px 8px;
    }
    .sr-accordion__title {
        font-size: 22px;
    }
    .sr-reviews__head {
        margin-top: 24px;
    }
    .sr-reviews__sort {
        width: 100%;
        justify-content: space-between;
    }
    .sr-detail:not(#sr-x) .sr-select select {
        width: 200px;
    }
    .sr-stars--summary .sr-star {
        width: 28px;
        height: 26px;
    }
    .sr-stars--summary {
        gap: 4px;
    }
    .sr-detail__section,
    .sr-detail__inner > :is(.sr-other, .sr-band, .sr-more-ways) {
        margin-top: 56px;
    }
    /* The last accordion's rule already closes the info column. */
    .sr-detail__related {
        padding-top: 0;
        border-top: 0;
    }
    .sr-detail:not(#sr-x) .sr-detail__h2 {
        margin-bottom: 24px;
        font-size: 26px;
    }
    .sr-detail__cards {
        grid-template-columns: minmax(0, 1fr);
    }
    .sr-review-form__foot .sr-pbtn {
        width: 100%;
        min-width: 0;
    }
    .sr-detail__files {
        padding: 4px 16px;
    }
}

.sr-reviews__write {
    text-align: center;
}

/* ---------------------------------------------------------------
   Review photos: thumbnails on a review, the "Photos from teachers"
   strip, the drop zone on the form and the photo viewer.
   --------------------------------------------------------------- */

.sr-detail:not(#sr-x) .sr-photo-thumb {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--sr-x-card-border);
    border-radius: 10px;
    background: var(--sr-x-bg-light);
    box-shadow: none;
    cursor: zoom-in;
    transition: border-color 120ms ease, transform 120ms ease;
}
.sr-detail:not(#sr-x) .sr-photo-thumb:hover {
    border-color: var(--sr-x-sky);
    background: var(--sr-x-bg-light);
}
.sr-detail:not(#sr-x) .sr-photo-thumb:active {
    transform: scale(0.97);
}
.sr-detail:not(#sr-x) .sr-photo-thumb:focus-visible {
    outline: 3px solid var(--sr-x-focus);
    outline-offset: 2px;
}
.sr-detail .sr-photo-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sr-photo-thumb__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 41, 66, 0.6);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

/* Under a review's text */
.sr-review__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sr-review__photos li {
    width: 80px;
    height: 80px;
}

/* At the top of the Reviews section */
.sr-photos-strip {
    margin-top: 28px;
}
.sr-detail:not(#sr-x) .sr-photos-strip__title {
    margin-bottom: 12px;
    color: var(--sr-x-heading);
    font-family: var(--sr-x-body-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}
.sr-photos-strip__count {
    color: var(--sr-x-light);
    font-weight: 500;
}
.sr-photos-strip__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}
.sr-photos-strip__list li {
    aspect-ratio: 1;
    max-width: 100%;
}
.sr-photos-strip__list li[hidden] {
    display: none;
}

/* The drop zone, left of the form's fields on wide screens */
@media (min-width: 900px) {
    .sr-review-form__form {
        display: grid;
        grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
        grid-template-areas:
            "error error"
            "photos rating"
            "photos name"
            "photos text"
            "photos foot";
        grid-template-rows: auto auto auto auto 1fr;
        column-gap: 40px;
        max-width: 1140px;
    }
    .sr-review-form__error { grid-area: error; }
    .sr-review-form__form .sr-photo-drop { grid-area: photos; align-self: start; }
    .sr-review-form__form .sr-stars-input { grid-area: rating; }
    .sr-review-form__form [data-field="name"] { grid-area: name; }
    .sr-review-form__form [data-field="text"] { grid-area: text; }
    .sr-review-form__form .sr-review-form__foot { grid-area: foot; align-self: start; }
}
@media (max-width: 899px) {
    /* Phones: stars, name and review first, then photos, then Submit. */
    .sr-review-form__form .sr-photo-drop { order: 1; }
    .sr-review-form__form .sr-review-form__foot { order: 2; }
}
.sr-photo-drop__optional {
    color: var(--sr-x-light);
    font-weight: 500;
}
.sr-photo-drop__hint {
    color: var(--sr-x-body);
    font-size: 14px;
    line-height: 1.5;
}
.sr-photo-drop__zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 200px;
    padding: 24px 16px;
    border: 2px dashed rgba(85, 86, 102, 0.3);
    border-radius: 12px;
    background: var(--sr-x-bg-light);
    color: var(--sr-x-blue);
    text-align: center;
    transition: border-color 120ms ease, background-color 120ms ease;
}
.sr-photo-drop__zone:hover,
.sr-photo-drop__zone.is-over {
    border-color: var(--sr-x-sky);
    background: var(--sr-x-sky-bg);
}
.sr-photo-drop__zone:focus-within {
    border-color: var(--sr-x-focus);
    box-shadow: 0 0 0 3px rgba(47, 174, 219, 0.25);
}
.sr-photo-drop__zone:active {
    background: #DDF0FA;
}
.sr-photo-drop__zone.is-full {
    opacity: 0.55;
}
.sr-photo-drop__lead {
    color: var(--sr-x-body);
    font-size: 15px;
    font-weight: 500;
}
.sr-photo-drop__pick {
    color: var(--sr-x-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.sr-photo-drop__coarse {
    display: none;
    color: var(--sr-x-body);
    font-size: 14px;
}
@media (pointer: coarse) {
    .sr-photo-drop__fine {
        display: none;
    }
    .sr-photo-drop__pick::first-letter {
        text-transform: uppercase;
    }
    .sr-photo-drop__coarse {
        display: block;
    }
    .sr-photo-drop__zone {
        min-height: 150px;
    }
}
/* The real file input covers the zone: a tap, a click, Enter or Space opens the picker. */
.sr-detail:not(#sr-x) .sr-photo-drop__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}
.sr-detail:not(#sr-x) .sr-photo-drop__input:disabled {
    cursor: not-allowed;
}
.sr-photo-drop__count {
    color: var(--sr-x-light);
    font-size: 14px;
}
.sr-photo-drop__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.sr-photo-drop__list:empty {
    display: none;
}
.sr-photo-drop__item {
    position: relative;
    aspect-ratio: 1;
    max-width: 100%;
}
.sr-photo-drop__thumb {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--sr-x-card-border);
    border-radius: 10px;
    background: var(--sr-x-bg-light);
}
.sr-detail .sr-photo-drop__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sr-photo-drop__item.is-uploading .sr-photo-drop__thumb img {
    opacity: 0.45;
}
.sr-photo-drop__state {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--sr-x-heading);
    font-size: 12px;
    font-weight: 600;
}
.sr-photo-drop__spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--sr-x-border);
    border-top-color: var(--sr-x-blue);
    border-radius: 50%;
    animation: sr-photo-spin 800ms linear infinite;
}
@keyframes sr-photo-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .sr-photo-drop__spinner { animation-duration: 2400ms; }
}
.sr-detail:not(#sr-x) .sr-photo-drop__remove {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 41, 66, 0.75);
    box-shadow: none;
    color: #fff;
    cursor: pointer;
}
.sr-photo-drop__remove svg {
    width: 12px;
    height: 12px;
}
.sr-detail:not(#sr-x) .sr-photo-drop__remove:hover {
    background: var(--sr-x-red);
}
.sr-detail:not(#sr-x) .sr-photo-drop__remove:active {
    transform: scale(0.94);
}
.sr-detail:not(#sr-x) .sr-photo-drop__remove:focus-visible {
    outline: 3px solid var(--sr-x-focus);
    outline-offset: 2px;
}
.sr-photo-drop__item.is-error {
    /* Problems sit under the photos, so the thumbnails stay together. */
    order: 1;
    grid-column: 1 / -1;
    aspect-ratio: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #FDEFF1;
}
.sr-photo-drop__problem {
    color: var(--sr-x-red);
    font-size: 14px;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.sr-detail:not(#sr-x) .sr-photo-drop__dismiss {
    flex: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--sr-x-blue);
    font-family: var(--sr-x-body-font);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
.sr-detail:not(#sr-x) .sr-photo-drop__dismiss:hover {
    color: var(--sr-x-blue-hover);
}
.sr-detail:not(#sr-x) .sr-photo-drop__dismiss:focus-visible {
    outline: 3px solid var(--sr-x-focus);
    outline-offset: 2px;
}
.sr-review-form__mine .sr-review__photos {
    margin-top: 4px;
}

/* The photo viewer (a modal dialog) */
html.sr-viewer-open {
    overflow: hidden;
}
.sr-detail:not(#sr-x) .sr-viewer {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #08141D;
    color: #fff;
}
.sr-viewer::backdrop {
    background: rgba(8, 20, 29, 0.6);
}
.sr-viewer__inner {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.sr-viewer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
}
.sr-viewer__count {
    font-size: 15px;
    font-weight: 600;
}
.sr-viewer__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    touch-action: pan-y;
}
.sr-detail .sr-viewer__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
    -webkit-user-drag: none;
}
.sr-detail:not(#sr-x) :is(.sr-viewer__close, .sr-viewer__arrow) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    color: #fff;
    cursor: pointer;
    transition: background-color 120ms ease;
}
.sr-detail:not(#sr-x) :is(.sr-viewer__close, .sr-viewer__arrow):hover {
    background: rgba(255, 255, 255, 0.28);
}
.sr-detail:not(#sr-x) :is(.sr-viewer__close, .sr-viewer__arrow):active {
    background: rgba(255, 255, 255, 0.4);
}
.sr-detail:not(#sr-x) :is(.sr-viewer__close, .sr-viewer__arrow):focus-visible {
    outline: 3px solid #7FCDF0;
    outline-offset: 2px;
}
.sr-detail:not(#sr-x) .sr-viewer__arrow {
    position: absolute;
    top: 50%;
    margin-top: -24px;
}
.sr-detail:not(#sr-x) .sr-viewer__arrow[hidden] {
    display: none;
}
.sr-viewer__arrow--prev { left: 0; }
.sr-viewer__arrow--next { right: 0; }
.sr-viewer__caption {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 760px;
    margin: 0 auto;
    padding-top: 16px;
    text-align: center;
}
.sr-viewer__from {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    font-size: 15px;
}
.sr-viewer__from strong {
    font-weight: 700;
}
.sr-viewer__date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}
.sr-viewer__text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}
.sr-detail:not(#sr-x) .sr-viewer__link {
    align-self: center;
    color: #9BD8F2;
    font-size: 14px;
}
.sr-detail:not(#sr-x) .sr-viewer__link[hidden] {
    display: none;
}

@media (max-width: 767px) {
    .sr-review__photos li {
        width: 64px;
        height: 64px;
    }
    .sr-photos-strip__list {
        gap: 6px;
    }
    /* On a phone the arrows sit over the photo's edges; swiping works too. */
    .sr-detail:not(#sr-x) .sr-viewer__arrow {
        width: 40px;
        height: 40px;
        margin-top: -20px;
        background: rgba(8, 20, 29, 0.55);
    }
    .sr-viewer__arrow--prev { left: 4px; }
    .sr-viewer__arrow--next { right: 4px; }
}
