:root {
    --bg: #090b10;
    --surface: #11141b;
    --surface2: #161a22;
    --border: rgba(255,255,255,.09);
    --text: #f8f7fb;
    --muted: #9297a5;
    --purple: #9c6cff;
    --blue: #279cff;
    --pink: #ff668d;
    --green: #36d99a;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(
            circle at 52% 18%,
            rgba(132,92,255,.12),
            transparent 27%
        ),
        radial-gradient(
            circle at 78% 45%,
            rgba(0,153,255,.08),
            transparent 24%
        ),
        #090b10;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;

    border-bottom: 1px solid var(--border);

    background:
        rgba(9,11,16,.88);

    backdrop-filter: blur(22px);
}

.header-inner {
    width: min(1280px, calc(100% - 40px));
    height: 84px;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.palette {
    font-size: 34px;
}

.brand strong {
    display: block;
    font-size: 25px;
    letter-spacing: -.8px;
}

.brand strong span {
    color: #f27ca4;
}

.brand small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

nav {
    display: flex;
    gap: 38px;
}

nav a {
    text-decoration: none;
    font-weight: 650;
    font-size: 14px;
}

.browse-button {
    padding: 11px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
}

.page-shell {
    width: min(1280px, calc(100% - 40px));
    margin: auto;
    padding: 34px 0 70px;
}

.loading,
.error {
    min-height: 60vh;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.hidden {
    display: none !important;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs a {
    color: var(--muted);
}

.hero {
    display: grid;
    grid-template-columns:
        minmax(380px, .85fr)
        minmax(500px, 1.15fr);

    gap: 42px;
    align-items: start;
}

.art-frame {
    overflow: hidden;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,.18);

    background:
        linear-gradient(
            145deg,
            #171a21,
            #0e1016
        );

    box-shadow:
        0 30px 80px rgba(0,0,0,.38);
}

.art-frame img {
    display: block;
    width: 100%;
    height: auto;

    /* White is only the actual coloring paper. */
    background: #fff;
}

.info-column {
    padding-top: 10px;
}

.category-badge {
    display: inline-flex;
    padding: 8px 18px;

    border-radius: 999px;

    color: #fff;
    font-size: 13px;
    font-weight: 800;

    background:
        linear-gradient(
            135deg,
            #8c62ff,
            #b97bff
        );

    box-shadow:
        0 0 30px rgba(142,91,255,.28);
}

h1 {
    margin: 20px 0 12px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.04;
    letter-spacing: -1.7px;
}

.description {
    max-width: 720px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.75;
}

.details {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 15px;

    margin: 30px 0;
}

.detail {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 0;
}

.detail-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    color: #07100d;
    font-size: 18px;
}

.detail-icon.age {
    background: var(--green);
    box-shadow:
        0 0 28px rgba(54,217,154,.25);
}

.detail-icon.difficulty {
    background: #ffc15b;
    box-shadow:
        0 0 28px rgba(255,193,91,.25);
}

.detail-icon.tags {
    background: #ff7c96;
    box-shadow:
        0 0 28px rgba(255,124,150,.25);
}

.detail small {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
}

.detail strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.action {
    min-height: 80px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    border: 0;
    border-radius: 18px;

    color: white;
    cursor: pointer;

    box-shadow:
        0 18px 38px rgba(0,0,0,.28);

    transition:
        transform .18s ease,
        filter .18s ease;
}

.action:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.action > span {
    font-size: 26px;
}

.action strong,
.action small {
    display: block;
    text-align: left;
}

.action strong {
    font-size: 18px;
}

.action small {
    margin-top: 3px;
    opacity: .72;
}

.print {
    background:
        linear-gradient(
            135deg,
            #8357ef,
            #aa72ff
        );
}

.download {
    background:
        linear-gradient(
            135deg,
            #197fe7,
            #26a7ff
        );
}

.stats {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);

    margin-top: 20px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background:
        rgba(17,20,27,.86);

    box-shadow:
        0 18px 50px rgba(0,0,0,.22);
}

.stats div {
    position: relative;
    padding: 20px 12px;

    display: grid;
    grid-template-columns:
        auto auto;
    justify-content: center;
    gap: 2px 9px;
}

.stats div:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 18px;
    bottom: 18px;
    width: 1px;
    background: var(--border);
}

.stats span {
    grid-row: 1 / 3;
    align-self: center;
    color: #45a9ff;
    font-size: 21px;
}

.stats strong {
    font-size: 14px;
}

.stats small {
    color: var(--muted);
}

.share {
    margin-top: 26px;
}

.share p {
    color: #d8d9df;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-buttons button {
    width: 42px;
    height: 42px;

    border: 1px solid var(--border);
    border-radius: 50%;

    color: white;
    background: var(--surface2);

    cursor: pointer;
}

.related-section {
    margin-top: 58px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2 {
    font-size: 27px;
}

.section-heading a {
    color: #ad82ff;
    text-decoration: none;
}

.related-grid {
    display: grid;
    grid-template-columns:
        repeat(4, 1fr);
    gap: 17px;
}

.related-card {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #151820,
            #101218
        );

    text-decoration: none;

    transition:
        transform .18s ease,
        border-color .18s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color:
        rgba(156,108,255,.55);
}

.related-image {
    margin: 10px;
    overflow: hidden;
    aspect-ratio: 1 / 1.05;
    border-radius: 14px;

    /* Only the printable artwork area is white. */
    background: #fff;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.related-body {
    padding: 5px 15px 17px;
}

.related-body strong {
    display: block;
    margin-bottom: 10px;
}

.related-tags {
    display: flex;
    gap: 7px;
}

.related-tags span {
    padding: 5px 9px;
    border-radius: 999px;

    background:
        rgba(145,96,255,.15);

    color: #b995ff;

    font-size: 11px;
    font-weight: 750;
}

.discover {
    margin-top: 48px;
    padding: 26px;

    display: grid;
    grid-template-columns:
        auto 1fr auto;
    align-items: center;
    gap: 20px;

    border: 1px solid rgba(154,105,255,.42);
    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            rgba(24,27,36,.96),
            rgba(15,17,24,.96)
        );
}

.discover-icon {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;

    border-radius: 50%;
    background: rgba(255,185,76,.12);
    font-size: 28px;
}

.discover h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.discover p {
    margin: 0;
    color: var(--muted);
}

.discover > a {
    padding: 15px 22px;

    border-radius: 999px;

    color: white;
    text-decoration: none;
    font-weight: 800;

    background:
        linear-gradient(
            135deg,
            #8d5df4,
            #b46fff
        );
}

@media (max-width: 950px) {

    .hero {
        grid-template-columns: 1fr;
    }

    .art-frame {
        max-width: 620px;
        margin: auto;
    }

    .related-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }
}

@media (max-width: 700px) {

    .header-inner nav {
        display: none;
    }

    .details {
        grid-template-columns: 1fr;
    }

    .main-actions {
        grid-template-columns: 1fr;
    }

    .discover {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {

    .page-shell,
    .header-inner {
        width: min(
            100% - 24px,
            1280px
        );
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .stats div:not(:last-child)::after {
        top: auto;
        left: 18px;
        right: 18px;
        bottom: 0;
        width: auto;
        height: 1px;
    }
}

@media print {

    body * {
        visibility: hidden;
    }

    .art-frame,
    .art-frame * {
        visibility: visible;
    }

    .art-frame {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        box-shadow: none;
        background: white;
    }

    .art-frame img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}


/* =========================================================
   PRINT — ONE COLORING PAGE PER SHEET
========================================================= */

@media print {

    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    html,
    body {
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body * {
        visibility: hidden !important;
    }

    .art-frame,
    .art-frame * {
        visibility: visible !important;
    }

    .art-frame {
        position: fixed !important;

        left: 0 !important;
        top: 0 !important;

        width: 100% !important;
        height: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        border: 0 !important;
        border-radius: 0 !important;

        background: #fff !important;
        box-shadow: none !important;

        overflow: hidden !important;

        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .art-frame img {
        display: block !important;

        width: auto !important;
        height: auto !important;

        max-width: 100% !important;
        max-height: 270mm !important;

        margin: 0 auto !important;

        object-fit: contain !important;

        background: #fff !important;

        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }
}
