/*
 * GaLazo subpages (Timeline, Fan Arts).
 * Loaded after styles.css, which provides the navbar, footer and base styles.
 * Prefixes: pg- shared page parts, tl- timeline, art- fan arts gallery.
 */

:root {
    --pg-bg: #f9f9f9;
    --pg-surface: #ffffff;
    --pg-surface-muted: #f2f2f2;
    --pg-ink: #0f0f0f;
    --pg-ink-soft: #454545;
    --pg-ink-muted: #666666;
    --pg-line: #e5e5e5;
    --pg-line-strong: #cfcfcf;

    --pg-accent: #cc0000;
    --pg-accent-soft: #fff1f1;
    --pg-accent-line: #f2c6c6;

    --pg-dark: #141414;
    --pg-dark-line: #333333;
    --pg-dark-ink: #f5f5f5;
    --pg-dark-soft: #bdbdbd;
    --pg-dark-accent: #ff8f8f;

    --pg-mod: #2f7a1f;
    --pg-mod-soft: #eff7eb;
    --pg-mod-line: #cde5c3;

    --pg-honey-soft: #fff6dc;
    --pg-honey-line: #efd58a;
    --pg-honey-ink: #5c4300;

    --pg-focus: #1d5fd6;
    --pg-focus-on-dark: #8ab4ff;

    --pg-radius: 16px;
    --pg-gutter: 20px;
    --pg-nav-h: 72px; /* updated by pages.js to the real navbar height */
}

/* ---------- Shared ---------- */

.pg-page {
    background: var(--pg-bg);
    -webkit-font-smoothing: antialiased;
}

/* `hidden` must win over the display values below */
.pg-page [hidden] {
    display: none !important;
}

.pg-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.pg-skip {
    position: absolute;
    top: -80px;
    left: 12px;
    z-index: 1100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--pg-ink);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

.pg-skip:focus {
    top: 12px;
}

.pg-page :focus-visible {
    outline: 3px solid var(--pg-focus);
    outline-offset: 2px;
}

.pg-page .navbar :focus-visible,
.pg-page .footer :focus-visible,
.tl-card--spotlight :focus-visible,
.art-modal__figure :focus-visible {
    outline-color: var(--pg-focus-on-dark);
}

/* Navbar from styles.css: real buttons, nothing focusable off-screen */
.pg-page .nav-link {
    white-space: nowrap;
}

.pg-page .hamburger {
    padding: 10px 8px;
    margin: -10px -8px;
    border: 0;
    background: none;
}

@media (max-width: 968px) {
    .pg-page .nav-menu {
        visibility: hidden;
        transition: left 0.3s ease, visibility 0s linear 0.3s;
    }

    .pg-page .nav-menu.active {
        visibility: visible;
        transition: left 0.3s ease;
    }
}

/* Footer from styles.css, with stronger text contrast on the dark background */
.pg-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.pg-footer-heading {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #ff4d4d;
}

.pg-page .footer-section p,
.pg-page .footer-section ul li a,
.pg-page .footer-bottom {
    color: #a6a6a6;
}

.pg-page .footer-section ul li a:hover,
.pg-page .footer-section ul li a[aria-current="page"] {
    color: #ffffff;
}

.pg-page .footer-mgmt {
    color: rgba(255, 255, 255, 0.62);
}

.pg-page .footer-mgmt strong {
    color: rgba(255, 255, 255, 0.85);
}

.pg-main {
    padding-top: var(--pg-nav-h);
}

.pg-wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--pg-gutter);
}

.pg-hero {
    padding-top: clamp(40px, 7vw, 72px);
    padding-bottom: 8px;
}

.pg-eyebrow {
    margin: 0 0 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pg-accent);
}

.pg-title {
    margin: 0;
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--pg-ink);
}

.pg-accent {
    color: var(--pg-accent);
}

.pg-lead {
    max-width: 640px;
    margin: 14px 0 0;
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.65;
    color: var(--pg-ink-soft);
}

.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 18px;
    border: 1px solid var(--pg-line-strong);
    border-radius: 999px;
    background: var(--pg-surface);
    color: var(--pg-ink);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pg-btn:hover {
    border-color: var(--pg-ink);
}

.pg-btn--primary {
    border-color: var(--pg-ink);
    background: var(--pg-ink);
    color: #ffffff;
}

.pg-btn--primary:hover {
    border-color: var(--pg-accent);
    background: var(--pg-accent);
}

.pg-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 52px 24px;
    border: 1px dashed var(--pg-line-strong);
    border-radius: var(--pg-radius);
    background: var(--pg-surface);
    text-align: center;
}

.pg-empty__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: var(--pg-surface-muted);
    color: var(--pg-ink-muted);
    font-size: 1.35rem;
}

.pg-empty__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--pg-ink);
}

.pg-empty__text {
    max-width: 440px;
    margin: 6px 0 0;
    font-size: 0.9375rem;
    color: var(--pg-ink-muted);
}

.pg-noscript {
    padding: 16px 18px;
    border: 1px solid var(--pg-honey-line);
    border-radius: 12px;
    background: var(--pg-honey-soft);
    color: var(--pg-honey-ink);
}

html.pg-no-scroll {
    overflow: hidden;
}

/* ---------- Timeline ---------- */

.tl {
    --tl-date-w: 132px;
    --tl-rail-w: 44px;
    padding-bottom: 80px;
}

.tl-yearline {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
}

.tl-yearline::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--pg-line);
}

.tl-year {
    font-size: clamp(3.25rem, 11vw, 5.75rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.045em;
    color: var(--pg-ink);
}

.tl-years {
    display: flex;
    gap: 8px;
}

.tl-years__btn {
    padding: 6px 14px;
    border: 1px solid var(--pg-line);
    border-radius: 12px;
    background: var(--pg-surface);
    color: var(--pg-ink-muted);
    font-family: inherit;
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    cursor: pointer;
}

.tl-years__btn[aria-pressed="true"] {
    border-color: var(--pg-ink);
    color: var(--pg-ink);
}

/* Month selector, sticks under the fixed navbar */
.tl-bar {
    position: sticky;
    top: var(--pg-nav-h);
    z-index: 20;
    margin-top: 18px;
    border-bottom: 1px solid var(--pg-line);
    background: rgba(249, 249, 249, 0.96);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .tl-bar {
        background: rgba(249, 249, 249, 0.86);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

.tl-scroller {
    position: relative;
    margin: 0 -4px;
    padding: 10px 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.tl-scroller::-webkit-scrollbar {
    display: none;
}

.tl-scroller.has-after {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
}

.tl-scroller.has-before {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 44px);
    mask-image: linear-gradient(to right, transparent, #000 44px);
}

.tl-scroller.has-before.has-after {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent);
}

.tl-tabs {
    display: flex;
    gap: 6px;
    width: max-content;
    min-width: 100%;
}

.tl-tab {
    position: relative;
    flex: 1 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 6px 15px 9px;
    border: 1px solid var(--pg-line);
    border-radius: 999px;
    background: var(--pg-surface);
    color: var(--pg-ink-soft);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tl-tab:hover {
    border-color: var(--pg-line-strong);
    color: var(--pg-ink);
}

.tl-tab[aria-selected="true"] {
    border-color: var(--pg-accent);
    background: var(--pg-accent);
    color: #ffffff;
}

.tl-tab__dot {
    position: absolute;
    bottom: 7px;
    left: 50%;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: var(--pg-accent);
}

.tl-tab[aria-selected="true"] .tl-tab__dot {
    background: #ffffff;
}

/* Wide screens: all twelve months fit in one row in every language */
@media (min-width: 1000px) {
    .tl-tabs {
        gap: 4px;
    }

    .tl-tab {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 0.875rem;
    }
}

/* Month panel */
.tl-panel {
    padding-top: 32px;
}

.tl-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    margin-bottom: 22px;
}

.tl-panel__title {
    margin: 0;
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pg-ink);
    scroll-margin-top: calc(var(--pg-nav-h) + 90px);
}

.tl-panel__title:focus {
    outline: none;
}

.tl-panel__count {
    margin: 0;
    font-size: 0.875rem;
    color: var(--pg-ink-muted);
}

@keyframes pg-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.tl-enter {
    animation: pg-enter 0.32s ease both;
}

/* Rail: date | line + node | card */
.tl-list {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tl-list::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: calc(var(--tl-date-w) + var(--tl-rail-w) / 2 - 1px);
    width: 2px;
    border-radius: 2px;
    background: var(--pg-line);
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: var(--tl-date-w) var(--tl-rail-w) minmax(0, 1fr);
    align-items: start;
    padding-bottom: 20px;
    scroll-margin-top: calc(var(--pg-nav-h) + 90px);
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-item__date {
    grid-column: 1;
    grid-row: 1;
    padding-top: 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: right;
    color: var(--pg-ink);
}

.tl-item__node {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 12px;
    height: 12px;
    margin-top: 24px;
    border: 2px solid var(--pg-line-strong);
    border-radius: 50%;
    background: var(--pg-bg);
}

.tl-item--featured .tl-item__node {
    width: 14px;
    height: 14px;
    margin-top: 23px;
    border-color: var(--pg-accent);
    background: var(--pg-accent);
    box-shadow: 0 0 0 4px var(--pg-accent-soft);
}

.tl-item--spotlight .tl-item__node {
    width: 16px;
    height: 16px;
    margin-top: 22px;
    border-color: var(--pg-accent);
    background: var(--pg-accent);
    box-shadow: 0 0 0 5px rgba(204, 0, 0, 0.14);
}

.tl-item--mod .tl-item__node {
    border-color: var(--pg-mod);
    background: var(--pg-mod);
    box-shadow: 0 0 0 4px var(--pg-mod-soft);
}

/* Not happened yet: hollow node */
.tl-item--planned .tl-item__node {
    background: var(--pg-bg);
}

.tl-item .tl-card {
    grid-column: 3;
    grid-row: 1;
}

.tl-item.is-target .tl-card {
    outline: 2px solid var(--pg-accent);
    outline-offset: 3px;
}

/* Cards */
.tl-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 20px 24px;
    padding: 20px 22px;
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius);
    background: var(--pg-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tl-card:hover {
    border-color: var(--pg-line-strong);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

.tl-card__body {
    min-width: 0;
}

.tl-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.tl-chip,
.tl-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.tl-chip {
    background: var(--pg-surface-muted);
    color: var(--pg-ink-soft);
}

.tl-chip i,
.tl-status i {
    font-size: 0.6875rem;
}

.tl-status {
    padding: 3px 10px;
    border: 1px solid var(--pg-honey-line);
    background: var(--pg-honey-soft);
    color: var(--pg-honey-ink);
}

.tl-status--released {
    border-color: var(--pg-mod-line);
    background: var(--pg-mod-soft);
    color: var(--pg-mod);
}

.tl-card__title {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--pg-ink);
}

.tl-card__text p,
.tl-card__more p {
    margin: 0 0 10px;
    font-size: 0.96875rem;
    line-height: 1.7;
    color: var(--pg-ink-soft);
}

.tl-card__text p:last-child,
.tl-card__more p:last-child {
    margin-bottom: 0;
}

.tl-card__more {
    margin-top: 10px;
    animation: pg-enter 0.25s ease both;
}

.tl-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    margin-top: 6px;
    padding: 6px 0;
    border: 0;
    background: none;
    color: var(--pg-ink);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
}

.tl-more i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.tl-more[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.tl-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

/* Featured: milestones and key moments */
.tl-card--featured {
    border-color: var(--pg-accent-line);
    background: #fffafa;
    box-shadow: inset 4px 0 0 var(--pg-accent);
}

.tl-card--featured:hover {
    border-color: var(--pg-accent-line);
    box-shadow: inset 4px 0 0 var(--pg-accent), 0 8px 28px rgba(0, 0, 0, 0.06);
}

.tl-card--featured .tl-card__title {
    font-size: clamp(1.375rem, 3vw, 1.625rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.tl-card--featured .tl-chip {
    background: var(--pg-accent-soft);
    color: var(--pg-accent);
}

.tl-card--mod {
    border-color: var(--pg-mod-line);
    background: #fbfdfa;
    box-shadow: inset 4px 0 0 var(--pg-mod);
}

.tl-card--mod:hover {
    border-color: var(--pg-mod-line);
    box-shadow: inset 4px 0 0 var(--pg-mod), 0 8px 28px rgba(0, 0, 0, 0.06);
}

.tl-card--mod .tl-chip {
    background: var(--pg-mod-soft);
    color: var(--pg-mod);
}

/* Spotlight: the few defining moments */
.tl-card--spotlight {
    padding: 26px;
    border-color: var(--pg-dark);
    background: var(--pg-dark);
    color: var(--pg-dark-ink);
}

.tl-card--spotlight:hover {
    border-color: var(--pg-dark-line);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

.tl-card--spotlight .tl-card__title {
    margin-bottom: 12px;
    font-size: clamp(1.5rem, 3.4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: #ffffff;
}

.tl-card--spotlight .tl-card__text p,
.tl-card--spotlight .tl-card__more p {
    color: var(--pg-dark-soft);
}

.tl-card--spotlight .tl-chip {
    background: rgba(255, 255, 255, 0.08);
    color: var(--pg-dark-accent);
}

.tl-card--spotlight .tl-more {
    color: #ffffff;
}

.tl-card--spotlight .pg-btn {
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #ffffff;
}

.tl-card--spotlight .pg-btn:hover {
    border-color: #ffffff;
}

.tl-card--spotlight .pg-btn--primary {
    border-color: #ffffff;
    background: #ffffff;
    color: var(--pg-ink);
}

.tl-card--spotlight .pg-btn--primary:hover {
    border-color: var(--pg-accent);
    background: var(--pg-accent);
    color: #ffffff;
}

.tl-card__icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-right: 6px;
    border-radius: 12px;
    background: var(--pg-accent);
    color: #ffffff;
    font-size: 1.05rem;
}

/* Media: YouTube still (16:9, Shorts upright 9:16) or own image */
.tl-card__media {
    width: 240px;
}

.tl-card__media--short {
    width: 132px;
}

.tl-card--spotlight .tl-card__media {
    width: 300px;
}

.tl-card--spotlight .tl-card__media--short {
    width: 152px;
}

.tl-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: #1a1a1a;
}

.tl-card__media--short .tl-thumb {
    aspect-ratio: 9 / 16;
}

.tl-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.tl-thumb:hover img {
    transform: scale(1.03);
}

.tl-thumb__play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    background: rgba(15, 15, 15, 0.72);
    color: #ffffff;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.tl-thumb__play i {
    margin-left: 3px;
}

.tl-thumb:hover .tl-thumb__play {
    background: var(--pg-accent);
}

.tl-thumb__tag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(15, 15, 15, 0.72);
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 600;
}

.tl-card__media--image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Previous / next month */
.tl-pager {
    display: flex;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--pg-line);
}

.tl-pager__btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    padding: 10px 18px;
    border: 1px solid var(--pg-line);
    border-radius: 14px;
    background: var(--pg-surface);
    color: var(--pg-ink);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.tl-pager__btn:hover {
    border-color: var(--pg-ink);
}

.tl-pager__btn--next {
    margin-left: auto;
    text-align: right;
}

.tl-pager__btn i {
    font-size: 0.875rem;
    color: var(--pg-ink-muted);
}

.tl-pager__label {
    display: block;
    font-size: 0.75rem;
    color: var(--pg-ink-muted);
}

.tl-pager__month {
    display: block;
    font-size: 1rem;
    font-weight: 600;
}

.tl-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 760px;
    margin: 28px 0 0;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--pg-ink-muted);
}

.tl-note i {
    margin-top: 4px;
}

/* Below 1000px the date moves above its card */
@media (max-width: 999px) {
    .tl {
        --tl-rail-w: 30px;
    }

    .tl-list::before {
        top: 8px;
        left: calc(var(--tl-rail-w) / 2 - 1px);
    }

    .tl-item {
        grid-template-columns: var(--tl-rail-w) minmax(0, 1fr);
        padding-bottom: 26px;
    }

    .tl-item__date {
        grid-column: 2;
        grid-row: 1;
        padding: 0 0 8px;
        text-align: left;
    }

    .tl-item__node {
        grid-column: 1;
        margin-top: 4px;
    }

    .tl-item--featured .tl-item__node {
        margin-top: 3px;
    }

    .tl-item--spotlight .tl-item__node {
        margin-top: 2px;
    }

    .tl-item .tl-card {
        grid-column: 2;
        grid-row: 2;
    }
}

/* Phones: one column, picture on top */
@media (max-width: 719px) {
    :root {
        --pg-gutter: 16px;
    }

    .tl-card,
    .tl-card--spotlight {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding: 16px;
    }

    .tl-card--spotlight {
        padding: 18px;
    }

    .tl-card__media,
    .tl-card__media--short,
    .tl-card--spotlight .tl-card__media,
    .tl-card--spotlight .tl-card__media--short {
        order: -1;
        width: 100%;
    }

    .tl-card__media--short .tl-thumb {
        aspect-ratio: 16 / 9;
    }

    .tl-card__actions .pg-btn {
        flex: 1 1 auto;
    }

    .tl-pager__btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 10px 14px;
    }
}

/* ---------- Fan Arts ---------- */

.art {
    padding-bottom: 80px;
}

.art__content {
    margin-top: 32px;
}

.art__count {
    margin: 0 0 16px;
    font-size: 0.875rem;
    color: var(--pg-ink-muted);
}

.art__status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 56px 16px;
    font-size: 0.9375rem;
    color: var(--pg-ink-muted);
}

/* Masonry columns keep every artwork at its own aspect ratio */
.art-grid {
    margin: 0;
    padding: 0;
    list-style: none;
    columns: 2;
    column-gap: 12px;
}

.art-grid__item {
    margin-bottom: 12px;
    break-inside: avoid;
}

.art-card {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--pg-line);
    border-radius: 14px;
    background: var(--pg-surface);
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: zoom-in;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.art-card:hover {
    border-color: var(--pg-line-strong);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.art-card__frame {
    display: block;
    background: var(--pg-surface-muted);
}

.art-card__frame img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: contain;
}

.art-card__caption {
    display: block;
    padding: 10px 12px 12px;
}

.art-card__title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--pg-ink);
}

.art-card__by {
    display: block;
    margin-top: 2px;
    font-size: 0.8125rem;
    color: var(--pg-ink-muted);
}

@media (min-width: 700px) {
    .art-grid {
        columns: 3;
        column-gap: 16px;
    }

    .art-grid__item {
        margin-bottom: 16px;
    }
}

@media (min-width: 1000px) {
    .art-grid {
        columns: 4;
    }
}

@media (max-width: 339px) {
    .art-grid {
        columns: 1;
    }
}

/* Lightbox */
.art-modal {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 16px;
    border: 0;
    background: transparent;
    color: var(--pg-ink);
}

.art-modal[open] {
    display: grid;
    place-items: center;
}

.art-modal::backdrop {
    background: rgba(10, 10, 10, 0.86);
}

.art-modal__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
        "figure bar"
        "figure info";
    width: min(1120px, 100%);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    border-radius: 18px;
    background: var(--pg-surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.art-modal__bar {
    grid-area: bar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px 0 22px;
}

.art-modal__counter {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--pg-ink-muted);
}

.art-modal__close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--pg-line);
    border-radius: 50%;
    background: var(--pg-surface);
    color: var(--pg-ink);
    font-size: 1.1rem;
    cursor: pointer;
}

.art-modal__close:hover {
    border-color: var(--pg-ink);
}

.art-modal__figure {
    position: relative;
    grid-area: figure;
    display: grid;
    place-items: center;
    min-height: 320px;
    background: #111111;
}

.art-modal__image {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    margin: 0;
}

.art-modal__image img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.art-modal__nav {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--pg-ink);
    cursor: pointer;
}

.art-modal__nav--prev {
    left: 12px;
}

.art-modal__nav--next {
    right: 12px;
}

.art-modal__info {
    grid-area: info;
    overflow-y: auto;
    padding: 8px 22px 24px;
}

.art-modal__category {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pg-accent);
}

.art-modal__title {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.25;
}

.art-modal__by {
    margin: 6px 0 0;
    font-size: 0.9375rem;
    color: var(--pg-ink-soft);
}

.art-modal__date {
    display: block;
    margin-top: 2px;
    font-size: 0.8125rem;
    color: var(--pg-ink-muted);
}

.art-modal__desc {
    margin-top: 16px;
}

.art-modal__desc p {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--pg-ink-soft);
}

.art-modal__link {
    margin-top: 18px;
}

@media (max-width: 759px) {
    .art-modal {
        padding: 10px;
    }

    .art-modal__panel {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "bar"
            "figure"
            "info";
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
    }

    .art-modal__bar {
        padding: 8px 8px 8px 16px;
    }

    .art-modal__figure {
        min-height: 200px;
    }

    .art-modal__image img {
        max-height: 62vh;
    }

    .art-modal__info {
        overflow: visible;
        padding: 16px 16px 22px;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .tl-enter,
    .tl-card__more {
        animation: none;
    }

    .tl-card,
    .tl-tab,
    .tl-thumb img,
    .tl-thumb__play,
    .tl-more i,
    .tl-pager__btn,
    .pg-btn,
    .art-card {
        transition: none;
    }

    .tl-thumb:hover img {
        transform: none;
    }
}
