/* shelf.mofiyinebo.com: cardboard shelves, spines set in type, and an index card for each. */
:root {
    --board: #c7a676;
    --board-edge: #a8875a;
    --board-flute: rgba(90, 62, 30, 0.14);
    --wall-shadow: rgba(40, 26, 14, 0.18);
}

:root[data-theme='dark'] {
    --board: #6a553a;
    --board-edge: #4f3f2b;
    --board-flute: rgba(0, 0, 0, 0.22);
    --wall-shadow: rgba(0, 0, 0, 0.45);
}

.defs {
    height: 0;
    position: absolute;
    width: 0;
}

.room {
    align-items: end;
    column-gap: 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin: 0 auto;
    max-width: 1080px;
    padding: 3.5rem 1.25rem calc(4rem + env(safe-area-inset-bottom));
    row-gap: 3.5rem;
}

/* The intro, then films, tv, albums, songs and the few books, each across the whole wall. */
.intro {
    max-width: 480px;
}

.intro .kicker {
    margin-bottom: 0.65rem;
}

.title {
    font-size: clamp(2.1rem, 7vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.02;
}

.title span {
    color: var(--accent);
}

.lede {
    color: var(--muted);
    font-size: 1.02rem;
    margin-top: 1rem;
}

/* the way into the 3D room */
.intro-room {
    align-items: center;
    background: var(--primary);
    border-radius: 999px;
    box-shadow: 0 10px 20px -14px rgba(var(--shadow), 0.9);
    color: var(--on-primary);
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 800;
    gap: 0.4rem;
    margin-top: 1.1rem;
    min-height: 44px;
    padding: 0 1.1rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.intro-room:hover,
.intro-room:focus-visible {
    transform: translateY(-2px);
}

.intro-room:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* A bookcase of short shelves, side by side where there's room. Each shelf is a row of
   spines standing on a strip of corrugated card. ------------------------------------------- */
.shelves {
    display: contents;
}

.shelf--films,
.shelf--shows,
.shelf--albums,
.shelf--songs,
.shelf--books {
    grid-column: 1 / -1;
}

.shelf {
    min-width: 0;
    position: relative;
}

.shelf-row {
    align-items: flex-end;
    display: flex;
    gap: 3px;
    min-height: 270px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 34px 2rem 0 1.25rem;
    position: relative;
    scrollbar-width: none;
}

/* While more of a row is out of sight, its far end fades, so you know to swipe. */
.shelf-row[data-more] {
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
    mask-image: linear-gradient(90deg, #000 82%, transparent);
}

.shelf-row::-webkit-scrollbar {
    display: none;
}

/* Under the spines: the board, its label tag and, for films, where to find the rest. */
.shelf-foot {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0 0.25rem 0 1.5rem;
    position: relative;
}

/* The board: a lit top edge, then the cut face showing its flutes. */
.shelf-foot::before {
    background:
        linear-gradient(var(--board-edge), var(--board-edge)) 0 0 / 100% 5px no-repeat,
        repeating-linear-gradient(90deg, transparent 0 5px, var(--board-flute) 5px 7px),
        var(--board);
    border-radius: 2px;
    box-shadow: 0 14px 18px -12px var(--wall-shadow), inset 0 -2px 0 rgba(0, 0, 0, 0.08);
    content: '';
    height: 18px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

.shelf-label {
    background: rgb(var(--sheet));
    border-radius: 2px;
    box-shadow: 0 6px 10px -6px rgba(var(--shadow), 0.5);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    left: 1.5rem;
    letter-spacing: 0.16em;
    margin-top: 10px;
    padding: 0.3rem 0.7rem;
    position: relative;
    text-transform: uppercase;
    transform: rotate(-2deg);
    z-index: 3;
}

.shelf-link {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 26px;
    text-decoration: underline;
    text-decoration-color: var(--rule);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}

.shelf-hint {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 0.45rem;
    margin-top: 26px;
}

/* The same play triangle as the button on the card. */
.shelf-hint::before {
    border-color: transparent transparent transparent var(--red);
    border-style: solid;
    border-width: 0.3rem 0 0.3rem 0.5rem;
    content: '';
}

.shelf-link:hover {
    color: var(--primary);
}

/* A spine ------------------------------------------------------------------------------- */
.spine {
    align-items: center;
    background-color: var(--c);
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.16), rgba(255, 255, 255, 0.1) 18%, transparent 40%, transparent 78%, rgba(0, 0, 0, 0.18)),
        linear-gradient(var(--on), var(--on)),
        linear-gradient(var(--on), var(--on)),
        url('assets/handmade-paper.jpg');
    background-blend-mode: normal, normal, normal, multiply;
    background-position: 0 0, 0 12px, 0 calc(100% - 12px), 0 0;
    background-repeat: no-repeat, no-repeat, no-repeat, repeat;
    background-size: 100% 100%, 100% 1.5px, 100% 1.5px, 300px auto;
    border: 0;
    border-radius: 2px 2px 0 0;
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.12), -1px 0 0 rgba(255, 255, 255, 0.06);
    color: var(--on);
    cursor: pointer;
    display: flex;
    flex: none;
    flex-direction: column;
    gap: 0.6rem;
    height: var(--h);
    justify-content: space-between;
    padding: 22px 0 18px;
    position: relative;
    transition: transform 0.28s cubic-bezier(0.215, 0.61, 0.355, 1), filter 0.2s ease;
    width: var(--w);
}

.spine-title,
.spine-by {
    font-weight: 800;
    line-height: 1.05;
    max-height: 100%;
    overflow: hidden;
    /* Every glyph turned with the line, apostrophes included. */
    text-orientation: sideways;
    writing-mode: vertical-rl;
}

/* Long titles wrap onto a second line, as they would on a wide spine. */
.spine-title {
    flex: 1;
    font-size: 0.74rem;
    letter-spacing: 0.02em;
    min-height: 0;
}

.spine-by {
    white-space: nowrap;
}

.spine-by {
    flex: none;
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    opacity: 0.75;
    text-transform: uppercase;
}

.spine--films {
    border-radius: 3px 3px 0 0;
    padding-top: 30px;
}

/* The book being read keeps a ribbon in it, hanging out of the top. */
.spine-ribbon {
    background: var(--red);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
    height: 34px;
    left: 30%;
    position: absolute;
    top: -26px;
    width: 9px;
    z-index: -1;
}

/* A film case: a white band at the top, like the label strip on a box. */
.spine--films::before {
    background: rgba(251, 247, 239, 0.9);
    content: '';
    height: 16px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

/* A box set: its white band runs along the bottom, where a film case has it at the top. */
.spine--shows {
    border-radius: 2px 2px 0 0;
    padding-bottom: 26px;
}

.spine--shows::before {
    background: rgba(251, 247, 239, 0.9);
    bottom: 0;
    content: '';
    height: 12px;
    left: 0;
    position: absolute;
    right: 0;
}

.spine--albums {
    border-radius: 1px 1px 0 0;
    padding: 16px 0 12px;
}

.spine--albums .spine-title {
    font-size: 0.66rem;
}

.spine--albums .spine-by {
    font-size: 0.5rem;
}

/* Songs: 7-inch singles in thin card sleeves. */
.spine--songs {
    border-radius: 1px 1px 0 0;
    padding: 12px 0 10px;
}

.spine--songs .spine-title {
    font-size: 0.6rem;
}

.spine--songs .spine-by {
    font-size: 0.46rem;
}

.spine--lean {
    margin-left: 10px;
    transform: rotate(7deg);
    transform-origin: 0 100%;
}

@media (hover: hover) {
    .spine:hover {
        filter: brightness(1.06);
        transform: translateY(-8px);
    }

    .spine--lean:hover {
        transform: rotate(7deg) translateY(-8px);
    }
}

.spine.is-out {
    transform: translateY(-34px);
}

.spine--lean.is-out {
    transform: rotate(0deg) translateY(-34px);
}

/* Pulled out: the cover and the index card ---------------------------------------------- */
.pulled {
    background: transparent;
    border: 0;
    color: var(--ink);
    height: 100dvh;
    margin: 0;
    max-height: none;
    max-width: none;
    overflow-x: hidden;
    overflow-y: auto;
    /* Room at the bottom for the buttons, which stay put whatever the card holds. */
    padding: 1.25rem 1.25rem calc(6.5rem + env(safe-area-inset-bottom));
    width: 100%;
}

.pulled::backdrop {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    background: rgba(23, 21, 18, 0.5);
}

.pulled[open] {
    animation: settle 0.3s ease both;
    display: grid;
    place-items: center;
}

@keyframes settle {
    from {
        opacity: 0;
    }
}

.pulled-inner {
    align-items: center;
    display: flex;
    gap: 2.25rem;
    perspective: 1200px;
}

.pulled-cover {
    aspect-ratio: 2 / 3;
    flex: none;
    position: relative;
    transform-origin: 50% 50%;
    width: 250px;
}

.cover--album {
    aspect-ratio: 1;
    margin-right: 90px;
    width: 270px;
}

/* A single is smaller, and its record has the wide centre hole of a 45. */
.cover--song {
    aspect-ratio: 1;
    margin-right: 76px;
    width: 228px;
}

.cover--song .record-label::after {
    height: 34%;
    left: 33%;
    top: 33%;
    width: 34%;
}

.cover-face {
    background-color: var(--c);
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(255, 255, 255, 0.08) 4%, transparent 9%), url('assets/handmade-paper.jpg');
    background-blend-mode: normal, multiply;
    background-size: 100% 100%, 360px auto;
    border-radius: 2px 5px 5px 2px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2), 0 30px 46px -20px rgba(0, 0, 0, 0.6);
    color: var(--on);
    display: flex;
    flex-direction: column;
    inset: 0;
    overflow: hidden;
    padding: 12% 11% 10%;
    position: absolute;
}

.cover--album .cover-face,
.cover--song .cover-face {
    background-blend-mode: multiply;
    background-image: url('assets/handmade-paper.jpg');
    background-size: 360px auto;
    border-radius: 3px;
}

.cover-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.05;
    position: relative;
    z-index: 1;
}

.cover-by,
.cover-small {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin-top: 0.8rem;
    opacity: 0.85;
    position: relative;
    text-transform: uppercase;
    z-index: 1;
}

.cover-small {
    margin: 0 0 0.8rem;
}

.cover-year {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-top: auto;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

/* The real artwork, where there is some: it fills the face, with the binding's shadow over a
   book's left edge and a little gloss on posters and sleeves. */
.has-art .cover-face {
    background: #141210;
    padding: 0;
}

.cover-art {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.has-art .cover-face::after {
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.12), transparent 35%);
    content: '';
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.cover--book.has-art .cover-face::after {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.32), rgba(255, 255, 255, 0.14) 3%, rgba(0, 0, 0, 0.08) 6%, transparent 10%),
        linear-gradient(115deg, rgba(255, 255, 255, 0.1), transparent 35%);
}

/* Three layouts, chosen by the title: a sun, bands, or a rule under the title. */
.cover-motif {
    position: absolute;
}

.cover-layout--0 .cover-motif {
    border: 2px solid currentColor;
    border-radius: 50%;
    bottom: -18%;
    height: 70%;
    opacity: 0.22;
    right: -20%;
    width: 105%;
}

.cover-layout--1 .cover-motif {
    background: repeating-linear-gradient(0deg, currentColor 0 3px, transparent 3px 11px);
    bottom: 22%;
    height: 22%;
    left: 0;
    opacity: 0.16;
    right: 0;
}

.cover-layout--2 .cover-motif {
    background: currentColor;
    height: 3px;
    left: 11%;
    opacity: 0.6;
    top: 46%;
    width: 30%;
}

/* Films: a poster, the title at the bottom, a heavier frame, the bands up top out of its way. */
.cover--film.cover-layout--1 .cover-motif,
.cover--series.cover-layout--1 .cover-motif {
    bottom: auto;
    top: 14%;
}

.cover--film .cover-face,
.cover--series .cover-face {
    border-radius: 3px;
    box-shadow: inset 0 0 0 8px rgba(0, 0, 0, 0.12), 0 2px 3px rgba(0, 0, 0, 0.2), 0 30px 46px -20px rgba(0, 0, 0, 0.6);
    justify-content: flex-end;
}

.cover--film .cover-year,
.cover--series .cover-year {
    margin-top: 0.7rem;
}

.cover--film .cover-title,
.cover--series .cover-title {
    font-size: 1.8rem;
}

/* Albums: the record slides out of the sleeve and turns, slowly. */
.record {
    animation: slide-out 0.9s 0.35s cubic-bezier(0.215, 0.61, 0.355, 1) both;
    background:
        radial-gradient(circle, transparent 0 17%, rgba(255, 255, 255, 0.05) 17.5%, transparent 18%),
        repeating-radial-gradient(circle, #141210 0 2px, #221f1b 2px 3px),
        #141210;
    border-radius: 50%;
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.6);
    height: 94%;
    left: 3%;
    position: absolute;
    top: 3%;
    width: 94%;
}

.record::after {
    background: conic-gradient(from 30deg, transparent 0 20%, rgba(255, 255, 255, 0.12) 25%, transparent 32% 70%, rgba(255, 255, 255, 0.08) 75%, transparent 80%);
    border-radius: 50%;
    content: '';
    inset: 0;
    position: absolute;
}

.record-label {
    animation: turn 3.6s 1.2s linear infinite;
    background: var(--c);
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15);
    height: 34%;
    left: 33%;
    position: absolute;
    top: 33%;
    width: 34%;
}

.record-label::before {
    background: rgba(0, 0, 0, 0.18);
    content: '';
    height: 2px;
    left: 18%;
    position: absolute;
    top: 30%;
    width: 64%;
}

.record-label::after {
    background: #141210;
    border-radius: 50%;
    content: '';
    height: 10%;
    left: 45%;
    position: absolute;
    top: 45%;
    width: 10%;
}

@keyframes slide-out {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(38%);
    }
}

@keyframes turn {
    to {
        transform: rotate(360deg);
    }
}

/* The index card --------------------------------------------------------------------------- */
.index-card {
    background-color: rgb(var(--sheet));
    background-image:
        linear-gradient(90deg, transparent 2.9rem, var(--margin-line) 2.9rem, var(--margin-line) calc(2.9rem + 1.5px), transparent calc(2.9rem + 1.5px)),
        repeating-linear-gradient(transparent 0 calc(1.6rem - 1px), var(--ruled) calc(1.6rem - 1px) 1.6rem),
        linear-gradient(rgba(var(--sheet), 0.86), rgba(var(--sheet), 0.86)),
        var(--texture);
    background-position: 0 0, 0 3.4rem, 0 0, 0 0;
    background-size: 100% 100%, 100% 100%, 100% 100%, 520px auto;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(var(--shadow), 0.08), 0 26px 44px -24px rgba(0, 0, 0, 0.6);
    max-width: 340px;
    min-height: 260px;
    padding: 1.6rem 1.5rem 1.8rem 3.6rem;
    position: relative;
    transform: rotate(1.4deg);
    width: 340px;
}

.index-card .tape {
    left: 42%;
    top: -12px;
    transform: rotate(-4deg);
}

.index-kind {
    color: var(--faint);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.6rem;
    text-transform: uppercase;
}

.index-title {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.6rem;
    margin-top: 0.2rem;
}

.index-by {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.6rem;
}

.index-by[hidden],
.index-rating[hidden],
.index-note[hidden] {
    display: none;
}

/* A bit of one song, for albums: a round button, the song, and how much of the 30 seconds is left. */
.index-listen {
    align-items: center;
    column-gap: 0.7rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 1.6rem;
}

.index-listen[hidden] {
    display: none;
}

.listen-button {
    align-items: center;
    background: var(--primary);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.55);
    color: var(--on-primary);
    cursor: pointer;
    display: inline-flex;
    height: 2.4rem;
    justify-content: center;
    padding: 0;
    width: 2.4rem;
}

.listen-button:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

/* A play triangle, and two bars while it plays. */
.listen-icon {
    border-color: transparent transparent transparent currentColor;
    border-style: solid;
    border-width: 0.42rem 0 0.42rem 0.68rem;
    height: 0;
    margin-left: 0.18rem;
    width: 0;
}

.listen-button[aria-pressed='true'] .listen-icon {
    border-color: currentColor;
    border-style: solid;
    border-width: 0 0.2rem;
    height: 0.8rem;
    margin-left: 0;
    width: 0.62rem;
}

.listen-what {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.listen-song {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.listen-song::before {
    color: var(--faint);
    content: 'play a bit of ';
    font-weight: 600;
}

.listen-fav {
    color: var(--red);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.listen-fav[hidden] {
    display: none;
}

.listen-fav::before {
    content: '♥ ';
}

.listen-time {
    background: var(--rule);
    border-radius: 2px;
    display: block;
    height: 3px;
    overflow: hidden;
}

.listen-time span {
    background: var(--red);
    display: block;
    height: 100%;
    transform: scaleX(var(--done, 0));
    transform-origin: left;
}

.listen-link {
    color: var(--faint);
    font-size: 0.72rem;
    font-weight: 700;
    grid-column: 2;
    letter-spacing: 0.04em;
    margin-top: 0.4rem;
    text-decoration: none;
}

.listen-link:hover,
.listen-link:focus-visible {
    color: var(--ink);
    text-decoration: underline;
}

.index-listen.is-stuck .listen-song::before {
    content: 'couldn’t play ';
}

.index-rating {
    align-items: baseline;
    display: flex;
    gap: 0.5rem;
    line-height: 1.6rem;
    margin-top: 1.6rem;
}

.index-stars {
    color: var(--amber);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

.index-episodes {
    font-size: 0.9rem;
    font-weight: 700;
}

.index-heart {
    color: var(--red);
    font-size: 0.95rem;
}

.index-where {
    color: var(--faint);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.index-note {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.6rem;
    margin-top: 1.6rem;
}

.index-note.is-empty {
    color: var(--faint);
}

.index-stamp {
    border: 2px solid var(--red);
    border-radius: 4px;
    color: var(--red);
    display: table;
    filter: url(#stamp-ink);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin: 1.4rem 0.2rem 0 auto;
    opacity: 0.85;
    padding: 0.25rem 0.6rem;
    text-transform: uppercase;
    transform: rotate(-8deg);
}

.index-stamp[hidden] {
    display: none;
}

.pulled-nav {
    align-items: center;
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    left: 0;
    position: fixed;
    right: 0;
}

.pulled-button {
    background: rgba(251, 247, 239, 0.94);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.6);
    color: #211e19;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 800;
    min-height: 44px;
    min-width: 44px;
    padding: 0 1rem;
}

.pulled-button--back {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    padding: 0 1.3rem;
}

.pulled-button:hover {
    background: #fff;
}

/* On phones the shelf has no bar: just the shelves, and a way back at the bottom. */
.room-foot {
    display: none;
    grid-column: 1 / -1;
    justify-content: center;
}

.room-foot .brand {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

@media (max-width: 640px) {
    .topbar {
        display: none;
    }

    .room-foot {
        display: flex;
    }
}

@media (max-width: 720px) {
    .room {
        padding-top: 2.5rem;
    }

    .shelf-label {
        left: 0.25rem;
    }

    .room {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 3rem;
    }

    .pulled {
        padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom));
    }

    .pulled-inner {
        flex-direction: column;
        gap: 1.4rem;
    }

    .pulled-cover {
        width: min(46vw, 200px);
    }

    .cover--album {
        margin-right: min(18vw, 80px);
        width: min(52vw, 220px);
    }

    .cover--song {
        margin-right: min(16vw, 68px);
        width: min(46vw, 190px);
    }

    .cover-title {
        font-size: 1.2rem;
    }

    .cover--film .cover-title,
    .cover--series .cover-title {
        font-size: 1.35rem;
    }

    .index-card {
        min-height: 0;
        transform: rotate(0.8deg);
        width: 100%;
    }

    .pulled-nav {
        bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .record,
    .record-label {
        animation: none;
    }

    .record {
        transform: translateX(38%);
    }
}

/* Two things built for fun, pinned under the shelves like index cards. --------------------- */
.toys {
    align-self: end;
}

.toys .kicker {
    margin-bottom: 0.65rem;
}

.toys-cards {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.1rem;
}

.toy {
    background-color: rgb(var(--sheet));
    background-image:
        repeating-linear-gradient(transparent 0 calc(1.6rem - 1px), var(--ruled) calc(1.6rem - 1px) 1.6rem),
        linear-gradient(rgba(var(--sheet), 0.86), rgba(var(--sheet), 0.86)),
        var(--texture);
    background-position: 0 2.6rem, 0 0, 0 0;
    background-size: 100% 100%, 100% 100%, 520px auto;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(var(--shadow), 0.08), 0 20px 34px -22px rgba(0, 0, 0, 0.55);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.4rem 1.1rem 1.1rem;
    position: relative;
    text-decoration: none;
    transform: rotate(-1deg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.toy:nth-child(2) {
    transform: rotate(1.2deg);
}

.toy:hover,
.toy:focus-visible {
    box-shadow: 0 1px 1px rgba(var(--shadow), 0.08), 0 28px 40px -22px rgba(0, 0, 0, 0.6);
    transform: rotate(0deg) translateY(-4px);
}

.toy:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.toy-tape {
    background: var(--tape);
    height: 22px;
    left: 50%;
    position: absolute;
    top: -10px;
    transform: translateX(-50%) rotate(-3deg);
    width: 86px;
}

.toy-kind {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.toy-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.toy-note {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.toy-go {
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 0.4rem;
}

@media (max-width: 420px) {
    .toys-cards {
        gap: 1rem;
    }

    .toy {
        padding: 1.3rem 0.9rem 1rem;
    }

    .toy-name {
        font-size: 1.08rem;
    }
}
