/* Astro PM Gallery
 *
 * Everything is scoped under .apg so the gallery keeps its own look inside whatever
 * theme the page uses, and every colour is a variable so the light and dark palettes
 * are the same rules with different values. The palette is the site's: deep navy
 * ground, cool blue accent, violet for the featured pick.
 */

.apg {
    --apg-bg:        #070B14;
    --apg-surface:   #0D1426;
    --apg-surface-2: #141E36;
    --apg-border:    #2A3A5C;
    --apg-text:      #E8EDF7;
    --apg-muted:     #8A96B2;
    --apg-accent:    #5AB0FF;
    --apg-violet:    #B07CFF;
    --apg-like:      #FF5C7A;
    /* The site sets Inter through Elementor's own selectors rather than on body, so the
     * gallery would otherwise fall back to the system stack and read as a foreign block.
     * Override --apg-font in the theme to use something else. */
    --apg-font:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --apg-radius:    14px;
    --apg-gap:       18px;
    --apg-shadow:    0 18px 44px rgba(0, 0, 0, .45);

    color: var(--apg-text);
    font-family: var(--apg-font);
    font-size: 16px;
    line-height: 1.55;
    container-type: inline-size;
}

.apg--theme-light {
    --apg-bg:        #F4F7FC;
    --apg-surface:   #FFFFFF;
    --apg-surface-2: #EEF3FB;
    --apg-border:    #D3DEF0;
    --apg-text:      #101A2E;
    --apg-muted:     #5D6B87;
    --apg-shadow:    0 18px 44px rgba(16, 26, 46, .16);
}

@media (prefers-color-scheme: light) {
    .apg--theme-auto {
        --apg-bg:        #F4F7FC;
        --apg-surface:   #FFFFFF;
        --apg-surface-2: #EEF3FB;
        --apg-border:    #D3DEF0;
        --apg-text:      #101A2E;
        --apg-muted:     #5D6B87;
        --apg-shadow:    0 18px 44px rgba(16, 26, 46, .16);
    }
}

.apg *,
.apg *::before,
.apg *::after { box-sizing: border-box; }

/* Themes style bare tables, headings and lists globally; neutralise that inside the
 * gallery so the component rules below are the only voice. */
.apg table, .apg thead, .apg tbody, .apg tfoot,
.apg tr, .apg th, .apg td {
    border: 0;
    background: transparent;
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
}
.apg dl, .apg dt, .apg dd,
.apg h2, .apg h3, .apg p, .apg figure { margin: 0; }

.apg .apg-icon { width: 1.05em; height: 1.05em; flex: none; }
.apg .apg-muted { color: var(--apg-muted); }
.apg .screen-reader-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* -- Toolbar --------------------------------------------------------------- */

.apg-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: var(--apg-gap);
}

.apg-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.apg-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--apg-border);
    border-radius: 999px;
    background: var(--apg-surface);
    color: var(--apg-muted);
    font: inherit;
    font-size: .875rem;
    line-height: 1.2;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}

.apg-chip:hover { color: var(--apg-text); border-color: var(--apg-accent); }

.apg-chip.is-active {
    color: var(--apg-text);
    border-color: var(--apg-accent);
    background: color-mix(in srgb, var(--apg-accent) 16%, var(--apg-surface));
}

.apg-chip__n {
    font-size: .75rem;
    color: var(--apg-muted);
    background: var(--apg-surface-2);
    border-radius: 999px;
    padding: 1px 7px;
}

.apg-tools { display: flex; gap: 8px; align-items: center; }

.apg-catselect { display: none; }

.apg-search__input,
.apg-catselect__select,
.apg-sort__select {
    padding: 8px 12px;
    border: 1px solid var(--apg-border);
    border-radius: 10px;
    background: var(--apg-surface);
    color: var(--apg-text);
    font: inherit;
    font-size: .875rem;
    min-height: 40px;
}

.apg-search__input { min-width: 15rem; }
.apg-search__input::placeholder { color: var(--apg-muted); }
.apg-search__input:focus,
.apg-catselect__select:focus,
.apg-sort__select:focus { outline: 2px solid var(--apg-accent); outline-offset: 1px; }

/* Phones: the chip row costs two rows of thumbs-width buttons before any pictures
 * appear. Swap it for a category dropdown beside the sort, search across the top,
 * and the grid starts one swipe sooner. */
@container (max-width: 640px) {
    .apg-chips { display: none; }
    .apg-catselect { display: block; flex: 1; min-width: 0; }
    .apg-toolbar { gap: 8px; }
    .apg-tools { width: 100%; flex-wrap: wrap; gap: 8px; }
    .apg-search { width: 100%; }
    .apg-search__input { width: 100%; min-width: 0; }
    .apg-sort { flex: 1; min-width: 0; }
    .apg-catselect__select,
    .apg-sort__select { width: 100%; }
}

/* -- Image of the Week ----------------------------------------------------- */

/* A hero, not a card: the picture fills the width and the words sit on it, under a
 * scrim heavy enough to stay readable over a bright core or a star field. */
.apg-featured {
    position: relative;
    display: block;
    aspect-ratio: 21 / 9;
    margin-bottom: var(--apg-gap);
    border: 1px solid var(--apg-border);
    border-radius: var(--apg-radius);
    overflow: hidden;
    background: var(--apg-bg);
    text-decoration: none;
    color: inherit;
    transition: border-color .18s;
}

.apg-featured:hover { border-color: var(--apg-violet); }
.apg-featured:focus-visible { outline: 2px solid var(--apg-accent); outline-offset: 2px; }

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

.apg-featured__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 72px 32px 24px;
    background: linear-gradient(to top,
        rgba(3, 6, 14, .92) 0%,
        rgba(3, 6, 14, .74) 34%,
        rgba(3, 6, 14, .30) 68%,
        rgba(3, 6, 14, 0) 100%);
    color: #FFFFFF;
}

.apg-featured__flag {
    font-size: .7rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--apg-violet);
    font-weight: 700;
}

.apg-featured__title { font-size: 2rem; font-weight: 700; line-height: 1.15; }
.apg-featured__author { color: rgba(255, 255, 255, .74); font-size: .9rem; }

/* The medallion sits clear of the caption scrim, top-right of the hero. */
.apg-featured__medal {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 116px;
    height: 116px;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6));
}

.apg-medal { width: 100%; height: 100%; display: block; object-fit: contain; }

@container (max-width: 720px) {
    .apg-featured { aspect-ratio: 4 / 3; }
    .apg-featured__medal { width: 78px; height: 78px; top: 10px; right: 10px; }
    .apg-featured__body { padding: 56px 20px 18px; }
    .apg-featured__title { font-size: 1.4rem; }
}

/* -- Grid ------------------------------------------------------------------ */

.apg-grid {
    display: grid;
    gap: var(--apg-gap);
    grid-template-columns: repeat(auto-fill, minmax(525px, 1fr));
    align-items: start;
}

.apg--cols-2 .apg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apg--cols-3 .apg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apg--cols-4 .apg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.apg--cols-5 .apg-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

@container (max-width: 720px) {
    .apg--cols-3 .apg-grid,
    .apg--cols-4 .apg-grid,
    .apg--cols-5 .apg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (max-width: 640px) {
    .apg-grid,
    .apg--cols-2 .apg-grid,
    .apg--cols-3 .apg-grid,
    .apg--cols-4 .apg-grid,
    .apg--cols-5 .apg-grid { grid-template-columns: 1fr; }
}

/* Masonry: one-pixel rows, and the script gives each tile a row span matching its
 * height. Ordinary grid placement still runs left to right, so "load more" keeps
 * appending in the order the server sent — which a CSS-columns masonry cannot do. */
.apg--masonry .apg-grid { grid-auto-rows: 1px; }
.apg--masonry .apg-tile__frame { aspect-ratio: var(--apg-ratio, 4 / 3); }
.apg--masonry .apg-tile__img { object-fit: cover; }

.apg-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--apg-surface);
    border: 1px solid var(--apg-border);
    border-radius: var(--apg-radius);
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.apg-tile:hover {
    transform: translateY(-2px);
    border-color: var(--apg-accent);
    box-shadow: var(--apg-shadow);
}

.apg-tile__link {
    display: block;
    position: relative;
    color: inherit;
    text-decoration: none;
    flex: 1;
}

.apg-tile__link:focus-visible { outline: 2px solid var(--apg-accent); outline-offset: -2px; }

.apg-tile__frame {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--apg-bg);
    overflow: hidden;
}

.apg-tile__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.apg-tile:hover .apg-tile__img { transform: scale(1.035); }

/* The Image of the Week medallion, top-right of that image's tile. */
.apg-tile__flag {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 84px;
    height: 84px;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .55));
}

.apg-tile__flag img { width: 100%; height: 100%; display: block; }

/* -- Tile caption ---------------------------------------------------------- */

/* Overlaid by default: a tile is then all picture, which is the point of a gallery.
 * caption="below" puts the words back under the image instead. */
.apg-tile__body {
    display: block;
    padding: 12px 14px 4px;
}

.apg-tile__title { display: block; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.apg-tile__author { display: block; color: var(--apg-muted); font-size: .8125rem; }

.apg-tile__stats {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 14px 12px;
    color: var(--apg-muted);
    font-size: .8125rem;
}

.apg--caption-overlay .apg-tile__body,
.apg--caption-overlay .apg-tile__stats {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
}

.apg--caption-overlay .apg-tile__body {
    padding: 54px 18px 14px;
    padding-right: 128px;
    background: linear-gradient(to top,
        rgba(3, 6, 14, .90) 0%,
        rgba(3, 6, 14, .62) 45%,
        rgba(3, 6, 14, 0) 100%);
    color: #FFFFFF;
}

.apg--caption-overlay .apg-tile__title { color: rgba(255, 255, 255, .85); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.apg--caption-overlay .apg-tile__author { color: rgba(255, 255, 255, .64); }

.apg--caption-overlay .apg-tile__stats {
    left: auto;
    right: 16px;
    bottom: 13px;
    z-index: 2;
    gap: 11px;
    color: rgba(255, 255, 255, .72);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}

.apg--caption-overlay .apg-tile__stats .apg-like { color: rgba(255, 255, 255, .82); }
.apg--caption-overlay .apg-tile__stats .apg-like:hover,
.apg--caption-overlay .apg-tile__stats .apg-like.is-liked { color: var(--apg-like); }

/* -- Likes and counters ---------------------------------------------------- */

.apg-stat { display: inline-flex; align-items: center; gap: 5px; }
.apg-stat__label { color: var(--apg-muted); }

.apg-like {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--apg-muted);
    font: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: color .15s, transform .15s;
}

.apg-like .apg-icon--heart { fill: none; }
.apg-like:hover { color: var(--apg-like); }
.apg-like.is-liked { color: var(--apg-like); }
.apg-like.is-liked .apg-icon--heart { fill: currentColor; }
.apg-like.is-busy { opacity: .55; pointer-events: none; }
.apg-like.just-liked { animation: apg-pop .32s ease; }

@keyframes apg-pop {
    40% { transform: scale(1.28); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .apg-tile, .apg-tile__img, .apg-like, .apg-featured { transition: none; }
    .apg-like.just-liked { animation: none; }
}

/* -- Load more / empty ----------------------------------------------------- */

.apg-more { display: flex; justify-content: center; margin-top: var(--apg-gap); }

.apg-btn {
    padding: 11px 26px;
    border: 1px solid var(--apg-border);
    border-radius: 999px;
    background: var(--apg-surface);
    color: var(--apg-text);
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.apg-btn:hover { border-color: var(--apg-accent); background: var(--apg-surface-2); }
.apg-btn[disabled] { opacity: .5; cursor: default; }

.apg-empty,
.apg-notice { color: var(--apg-muted); text-align: center; padding: 32px 0; }

.apg-grid.is-loading { opacity: .5; transition: opacity .15s; }

/* -- Modal ----------------------------------------------------------------- */

.apg-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
}

.apg-modal[hidden] { display: none; }
.apg-modal__backdrop { position: absolute; inset: 0; background: rgba(3, 6, 14, .82); backdrop-filter: blur(3px); }

/* Full-bleed viewer: the panel is the whole screen, whatever the monitor. */
.apg-modal__panel {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--apg-surface);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.apg-modal__close {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--apg-border);
    background: rgba(7, 11, 20, .72);
    color: var(--apg-text);
    text-decoration: none;
}

.apg-modal__close:hover { border-color: var(--apg-accent); color: var(--apg-accent); }

.apg-modal__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--apg-border);
    background: rgba(7, 11, 20, .72);
    color: var(--apg-text);
    cursor: pointer;
}

.apg-modal__nav:hover { border-color: var(--apg-accent); color: var(--apg-accent); }
.apg-modal__nav--prev { left: 14px; transform: translateY(-50%) rotate(180deg); }
.apg-modal__nav--next { right: calc(var(--apg-side-w, 440px) + 16px); }
.apg-modal__nav[hidden] { display: none; }

body.apg-modal-open { overflow: hidden; }

/* -- Detail ---------------------------------------------------------------- */

/* The image gets everything the monitor has, minus one fixed data column. The stage is
 * sticky, so the picture holds still while the acquisition data and comments scroll. */
.apg-detail {
    --apg-side-w: 440px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--apg-side-w);
    min-height: 100vh;
    min-height: 100dvh;
}

.apg-detail__medal {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 96px;
    height: 96px;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6));
}

.apg-detail__stage {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--apg-bg);
    height: 100vh;
    height: 100dvh;
}

/* The scroller is the pan surface: image centred by auto margins while it fits, native
 * scrolling takes over once zoomed past the stage. The zoom script sizes the image
 * explicitly; these max constraints are the no-JS fallback. */
.apg-detail__scroller {
    position: absolute;
    inset: 0;
    overflow: auto;
    display: flex;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.apg-detail__scroller.is-pannable { cursor: grab; }
.apg-detail__scroller.is-panning { cursor: grabbing; user-select: none; }

.apg-detail__img {
    /* flex: none — as a flex child, the image would otherwise be shrunk back to its
     * natural width the moment the zoom sizes it beyond 100%. */
    flex: none;
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* -- Zoom bar -------------------------------------------------------------- */

/* Top-left of the image, out of the way of the picture itself. Doubled-up selectors
 * keep the theme's global button styling from ever reaching these controls. */
.apg-zoom {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    display: none;
    align-items: center;
    gap: 3px;
    padding: 6px;
    background: rgba(7, 11, 20, .84);
    border: 1px solid var(--apg-border);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
}

.apg-zoom.is-ready { display: flex; }

.apg .apg-zoom button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    color: var(--apg-text);
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.apg .apg-zoom button:hover,
.apg .apg-zoom button:focus-visible { background: var(--apg-surface-2); color: var(--apg-accent); outline: none; }

.apg-zoom__pct {
    color: var(--apg-muted);
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    min-width: 3.6em;
    text-align: center;
}

.apg-zoom__rule { width: 1px; height: 18px; background: var(--apg-border); margin: 0 5px; }

.apg-detail__side {
    padding: 58px 26px 32px;
    border-left: 1px solid var(--apg-border);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

@media (max-width: 900px) {
    .apg-detail { grid-template-columns: 1fr; min-height: 0; }
    .apg-detail__stage { position: relative; height: 62vh; min-height: 320px; }
    .apg-zoom { top: 12px; left: 12px; }
    .apg-detail__side { border-left: 0; border-top: 1px solid var(--apg-border); padding-top: 26px; }
    .apg-modal__nav--next { right: 14px; }
}

.apg-detail__head { display: flex; flex-direction: column; gap: 4px; }
.apg-detail__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; }

.apg-badge {
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--apg-surface-2);
    color: var(--apg-muted);
}

.apg-badge--gold { background: var(--apg-violet); color: #1B1030; }
.apg-badge--quiet { border: 1px solid var(--apg-border); background: transparent; }

.apg-detail__title { margin: 0; font-size: 1.6rem; line-height: 1.2; font-weight: 700; color: var(--apg-text); }
.apg-detail__catalogs { margin: 0; color: var(--apg-accent); font-size: .85rem; }
.apg-detail__byline { margin: 0; color: var(--apg-muted); font-size: .875rem; }

.apg-detail__engage {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid var(--apg-border);
    border-bottom: 1px solid var(--apg-border);
    color: var(--apg-muted);
    font-size: .9rem;
}

.apg-detail__engage .apg-like { font-size: .95rem; }
.apg-detail__original { margin-left: auto; color: var(--apg-accent); font-size: .85rem; text-decoration: none; }
.apg-detail__original:hover { text-decoration: underline; }

.apg-detail__desc { color: var(--apg-text); font-size: .9375rem; }
.apg-detail__desc p { margin: 0 0 .7em; }
.apg-detail__desc p:last-child { margin-bottom: 0; }

.apg-card {
    background: var(--apg-surface-2);
    border: 1px solid var(--apg-border);
    border-radius: 12px;
    padding: 16px 18px;
    overflow: hidden;
}

.apg-card__title {
    margin: 0 0 12px;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--apg-accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* A hairline running off the heading toward the card edge. */
.apg-card__title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--apg-border), transparent);
}

.apg-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: .875rem; }
.apg-facts dt { color: var(--apg-muted); white-space: nowrap; }
.apg-facts dd { margin: 0; color: var(--apg-text); overflow-wrap: anywhere; }

.apg-filters { width: 100%; border-collapse: collapse; font-size: .8125rem; }

.apg-filters th {
    text-align: left;
    font-weight: 600;
    color: var(--apg-text);
    padding: 6px 0;
    vertical-align: middle;
}

.apg-filters td {
    color: var(--apg-muted);
    padding: 6px 0 6px 14px;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

/* The swatch cell: fixed narrow column, dot centred on the text line. */
.apg-filters td.apg-filters__swatch {
    width: 24px;
    padding: 6px 10px 6px 0;
    text-align: left;
}

.apg-filters__swatch span {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 3px;
    vertical-align: middle;
}

.apg-filters tfoot tr { border-top: 1px solid var(--apg-border); }
.apg-filters tfoot th { padding-top: 10px; color: var(--apg-muted); }
.apg-filters tfoot td { padding-top: 10px; color: var(--apg-text); font-weight: 600; }

/* -- Comments -------------------------------------------------------------- */

.apg-comments { display: flex; flex-direction: column; gap: 12px; }

.apg-comments__count {
    background: var(--apg-surface-2);
    border-radius: 999px;
    padding: 1px 8px;
    font-size: .72rem;
    letter-spacing: 0;
}

.apg-comments__list { display: flex; flex-direction: column; gap: 14px; }

.apg-comment { display: flex; flex-direction: column; gap: 3px; }
.apg-comment--reply { margin-left: 22px; padding-left: 12px; border-left: 2px solid var(--apg-border); }

.apg-comment__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: .8125rem; }
.apg-comment__name { font-weight: 600; color: var(--apg-text); }
.apg-comment__name.is-mine { color: var(--apg-accent); }
.apg-comment__date { color: var(--apg-muted); }
.apg-comment__replyto { color: var(--apg-accent); font-size: .78rem; }
.apg-comment__body { font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }

.apg-comment__actions { display: flex; gap: 12px; font-size: .78rem; }

.apg-linkbtn {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-size: inherit;
    color: var(--apg-muted);
    cursor: pointer;
}

.apg-linkbtn:hover { color: var(--apg-accent); }
.apg-linkbtn.is-on { color: var(--apg-like); }

.apg-comment__thumb { color: var(--apg-like); font-size: .78rem; display: inline-flex; align-items: center; gap: 4px; }

.apg-composer { display: flex; flex-direction: column; gap: 8px; }

.apg-composer__replybar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: .8125rem;
    color: var(--apg-accent);
}

.apg-composer__row { display: flex; gap: 8px; align-items: flex-end; }

.apg-composer__input {
    flex: 1;
    min-height: 44px;
    max-height: 180px;
    resize: vertical;
    padding: 10px 12px;
    border: 1px solid var(--apg-border);
    border-radius: 10px;
    background: var(--apg-surface);
    color: var(--apg-text);
    font: inherit;
    font-size: .9rem;
}

.apg-composer__input:focus { outline: 2px solid var(--apg-accent); outline-offset: 1px; }

.apg-composer__post {
    padding: 10px 20px;
    border: 0;
    border-radius: 10px;
    background: var(--apg-accent);
    color: #061020;
    font: inherit;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
}

.apg-composer__post[disabled] { opacity: .5; cursor: default; }
.apg-composer__as { color: var(--apg-muted); font-size: .78rem; }

.apg-signin {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px dashed var(--apg-border);
    border-radius: 10px;
    color: var(--apg-muted);
    font-size: .875rem;
}

.apg-signin a { color: var(--apg-accent); }

.apg-error {
    color: #FF8A9B;
    font-size: .8125rem;
}
