/* =============================================================
   CATALOG — STRUCTURAL CSS  (plugin default, theme-agnostic)
   -------------------------------------------------------------
   Ships inside the plugin. Provides LAYOUT only (grid, flex,
   sizing, positioning) and a NEUTRAL default skin that inherits
   the active WP theme's fonts and background.

   All decoration is routed through the `--geekui-*` custom
   property contract below. A GeekPress skin theme overrides
   these variables (and may add decorative layers) to restyle
   the catalog without touching this file or the markup.

   Markup contract:
     #geekui-root-catalog
     .geekui-catalog-searchbar / .geekui-catalog-settings
     .geekui-catalog-card  (+ __top __stars __star-btn __star
        __cover __cover-bg __cover-glow __bottom __title __meta
        __year __meta-sep __field __score __stats __stat
        __stat-icon __stat-value)   .geekui-catalog-card--tone-*
     .geekui-catalog-row   (+ __poster __cover __body __title
        __title-year __tags __tag __tag-sep __sum __rate-row
        __rate-reset __stars __star-btn __star __bar __bar-fill
        __count __score __score-top __score-star __score-value
        __score-label)              .geekui-catalog-row--tone-*
   ============================================================= */

/* ─── THEMING CONTRACT — neutral defaults ─────────────────────
   A skin theme re-declares any of these (scoped to its body
   class or :root) to restyle the catalog. Defaults here keep
   the catalog unobtrusive: transparent canvas, inherited fonts,
   accents derived from the site's own text colour.            */
:root {
    --geekui-bg:               transparent;
    --geekui-text:             inherit;
    --geekui-text-dim:         inherit;
    --geekui-text-mute:        inherit;

    --geekui-accent:           currentColor;
    --geekui-accent-2:         currentColor;

    --geekui-font-base:        inherit;
    --geekui-font-title:       inherit;
    --geekui-font-mono:        ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --geekui-surface:          rgba(127, 127, 127, 0.08);
    --geekui-surface-2:        rgba(127, 127, 127, 0.14);
    --geekui-border:           rgba(127, 127, 127, 0.28);

    --geekui-card-radius:      8px;
    --geekui-card-shadow:      none;
    --geekui-card-hover-shadow:0 4px 14px rgba(0, 0, 0, 0.14);

    /* semantic score tones — neutral until a theme colours them */
    --geekui-tone-exceptional: currentColor;
    --geekui-tone-great:       currentColor;
    --geekui-tone-good:        currentColor;
    --geekui-tone-mixed:       currentColor;
    --geekui-tone-poor:        currentColor;
    --geekui-tone-muted:       currentColor;
}

/* ─── Canvas ──────────────────────────────────────────────── */
#geekui-root-catalog {
    position: relative;
    padding: 24px 18px 60px;
    background: var(--geekui-bg);
    color: var(--geekui-text);
    font-family: var(--geekui-font-base);
}

/* ─── Searchbar ───────────────────────────────────────────── */
.geekui-catalog-searchbar {
    position: relative;
    margin: 16px 0 22px;
    height: 52px;
}
.geekui-catalog-searchbar input {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 14px 76px 14px 18px;
    background: var(--geekui-surface);
    border: 1px solid var(--geekui-border);
    border-radius: var(--geekui-card-radius);
    color: var(--geekui-text);
    font-family: var(--geekui-font-base);
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.geekui-catalog-searchbar input::placeholder { color: var(--geekui-text-mute); opacity: 0.7; }
.geekui-catalog-searchbar input:focus { border-color: var(--geekui-accent); }
.geekui-catalog-searchbar svg {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: calc(100% - 12px);
    box-sizing: border-box;
    padding: 8px 14px;
    color: var(--geekui-accent);
    cursor: pointer;
}

/* ─── Sort / view-toggle bar ──────────────────────────────── */
.geekui-catalog-settings {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
    overflow: visible !important;
}
.geekui-catalog-settings > div {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}
.geekui-catalog-settings > div > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 9px 14px !important;
    box-sizing: border-box !important;
    background: var(--geekui-surface) !important;
    border: 1px solid var(--geekui-border) !important;
    border-radius: var(--geekui-card-radius) !important;
    color: var(--geekui-text-dim) !important;
    font-family: var(--geekui-font-base) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    position: static !important;
    float: none !important;
    overflow: visible !important;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.geekui-catalog-settings > div > button:hover { border-color: var(--geekui-accent) !important; }
.geekui-catalog-settings > div > button.geekui-active,
.geekui-catalog-settings > div > button[class*="active"] {
    background: var(--geekui-surface-2) !important;
    border-color: var(--geekui-accent) !important;
    color: var(--geekui-text) !important;
}
.geekui-catalog-settings > div > button > svg {
    width: 12px !important;
    height: 12px !important;
    color: currentColor !important;
    position: static !important;
    flex: 0 0 auto !important;
}

/* ═══ GRID CARD ═══════════════════════════════════════════════ */
.geekui-catalog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    background: var(--geekui-surface);
    border: 1px solid var(--geekui-border);
    border-radius: var(--geekui-card-radius);
    box-shadow: var(--geekui-card-shadow);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.geekui-catalog-card:hover {
    border-color: var(--geekui-accent);
    box-shadow: var(--geekui-card-hover-shadow);
}

/* per-card runtime tone — set from the --tone-* modifier */
.geekui-catalog-card--tone-exceptional { --geekui-tone: var(--geekui-tone-exceptional); }
.geekui-catalog-card--tone-great       { --geekui-tone: var(--geekui-tone-great); }
.geekui-catalog-card--tone-good        { --geekui-tone: var(--geekui-tone-good); }
.geekui-catalog-card--tone-mixed       { --geekui-tone: var(--geekui-tone-mixed); }
.geekui-catalog-card--tone-poor        { --geekui-tone: var(--geekui-tone-poor); }
.geekui-catalog-card--tone-muted       { --geekui-tone: var(--geekui-tone-muted); }

/* Top — reset + interactive 10-star row */
.geekui-catalog-card__top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--geekui-border);
}
.geekui-catalog-card__rate-reset {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    color: var(--geekui-text-mute);
}
.geekui-catalog-card__rate-reset svg { width: 13px; height: 13px; }
.geekui-catalog-card__stars {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
}
/* Each of the 10 stars shares the row equally, so the full
   set always fits the card width — no clipping of the 10th. */
.geekui-catalog-card__star-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 16px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}
.geekui-catalog-card__star {
    width: 11px;
    height: 11px;
    max-width: 100%;
    color: var(--geekui-text-mute);
    opacity: 0.4;
    pointer-events: none;
    transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.geekui-catalog-card__star--on {
    color: var(--geekui-accent);
    opacity: 1;
}
.geekui-catalog-card__star-btn:hover .geekui-catalog-card__star { transform: scale(1.12); }

/* Cover */
.geekui-catalog-card__cover {
    position: relative;
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    text-decoration: none;
}
.geekui-catalog-card__cover-bg {
    position: absolute;
    inset: 0;
    background-size: cover !important;
    background-position: center !important;
}
.geekui-catalog-card__cover-bg img { width: 100%; height: 100%; display: block; opacity: 0.001; }
.geekui-catalog-card__cover-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ── poster-less cover → type-flavoured placeholder (movie / tv / game) ──
   Surface + text come from --geekui-* tokens (theme-driven); the accent wash +
   icon colour are per-type so each catalog reads differently. */
.geekui-catalog-card__noposter {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .05), transparent 60%),
        var(--geekui-surface, #16151c);
    color: var(--geekui-text-mute, #9a96a6);
}
.geekui-catalog-card__noposter::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .18;
    background: radial-gradient(130% 90% at 50% 16%, var(--noposter-accent, #d4a24a), transparent 62%);
    pointer-events: none;
}
.geekui-catalog-card__noposter-icon {
    position: relative;
    z-index: 1;
    font-size: 46px;
    line-height: 1;
    color: var(--noposter-accent, var(--geekui-accent, #d4a24a));
    opacity: .92;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .45));
}
.geekui-catalog-card__noposter-icon svg { display: block; }
.geekui-catalog-card__noposter-label {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--geekui-text, #e9e6f0);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* per-type accent — theme-driven. Falls back to the theme accent so colours
   track the active skin; a theme may set --geekui-noposter-{type} to give each
   catalog type its own on-brand colour. */
.geekui-catalog-card__noposter--movie { --noposter-accent: var(--geekui-noposter-movie, var(--geekui-accent, #d4a24a)); }
.geekui-catalog-card__noposter--tv    { --noposter-accent: var(--geekui-noposter-tv,    var(--geekui-accent, #d4a24a)); }
.geekui-catalog-card__noposter--game  { --noposter-accent: var(--geekui-noposter-game,  var(--geekui-accent, #d4a24a)); }

/* Bottom — title / meta / stats */
.geekui-catalog-card__bottom {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 14px;
    background: var(--geekui-surface);
    border-top: 1px solid var(--geekui-border);
}
a.geekui-catalog-card__title,
a.geekui-catalog-card__title:link,
a.geekui-catalog-card__title:visited {
    display: block;
    color: var(--geekui-text) !important;
    font-family: var(--geekui-font-title) !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s ease;
}
a.geekui-catalog-card__title:hover { color: var(--geekui-accent) !important; }

.geekui-catalog-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--geekui-text-dim);
    font-family: var(--geekui-font-base);
    font-size: 12px;
    line-height: 1.3;
    overflow: hidden;
    white-space: nowrap;
}
.geekui-catalog-card__year { flex: 0 0 auto; }
.geekui-catalog-card__meta-sep { color: var(--geekui-text-mute); font-size: 9px; }
a.geekui-catalog-card__field,
a.geekui-catalog-card__field:link,
a.geekui-catalog-card__field:visited {
    color: var(--geekui-text-dim) !important;
    text-decoration: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}
a.geekui-catalog-card__field:hover { color: var(--geekui-accent) !important; }

/* Score badge — flow element inside __meta. A skin may
   position:absolute it onto the cover (card is positioned). */
.geekui-catalog-card__score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    margin-left: auto;
    padding: 2px 7px;
    box-sizing: border-box;
    border: 1px solid var(--geekui-tone, var(--geekui-border));
    border-radius: 3px;
    color: var(--geekui-tone, var(--geekui-text));
    font-family: var(--geekui-font-base);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.geekui-catalog-card__stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--geekui-border);
}
a.geekui-catalog-card__stat,
.geekui-catalog-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--geekui-text-dim) !important;
    font-family: var(--geekui-font-base);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    transition: color 0.15s ease;
}
a.geekui-catalog-card__stat:hover { color: var(--geekui-accent) !important; }
.geekui-catalog-card__stat-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: var(--geekui-text-mute);
}
.geekui-catalog-card__stat--rating .geekui-catalog-card__stat-icon { color: var(--geekui-accent); }
.geekui-catalog-card__stat-value {
    color: var(--geekui-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══ LIST ROW ════════════════════════════════════════════════ */
.geekui-catalog-row {
    position: relative;
    display: grid;
    grid-template-columns: 124px 1fr 116px;
    gap: 20px;
    align-items: center;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 14px 16px;
    background: var(--geekui-surface);
    border: 1px solid var(--geekui-border);
    border-radius: var(--geekui-card-radius);
    box-shadow: var(--geekui-card-shadow);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.geekui-catalog-row:hover {
    border-color: var(--geekui-accent);
    box-shadow: var(--geekui-card-hover-shadow);
}
.geekui-catalog-row--tone-exceptional { --geekui-tone: var(--geekui-tone-exceptional); }
.geekui-catalog-row--tone-great       { --geekui-tone: var(--geekui-tone-great); }
.geekui-catalog-row--tone-good        { --geekui-tone: var(--geekui-tone-good); }
.geekui-catalog-row--tone-mixed       { --geekui-tone: var(--geekui-tone-mixed); }
.geekui-catalog-row--tone-poor        { --geekui-tone: var(--geekui-tone-poor); }
.geekui-catalog-row--tone-muted       { --geekui-tone: var(--geekui-tone-muted); }

.geekui-catalog-row__poster {
    position: relative;
    display: block;
    width: 124px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--geekui-border);
    background: var(--geekui-surface-2);
    text-decoration: none;
}
.geekui-catalog-row__cover {
    position: absolute;
    inset: 0;
    background-size: cover !important;
    background-position: center !important;
}
.geekui-catalog-row__cover img { width: 100%; height: 100%; display: block; opacity: 0.001; }

.geekui-catalog-row__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.geekui-catalog-row__title {
    margin: 0;
    font-family: var(--geekui-font-title);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.geekui-catalog-row__title a,
.geekui-catalog-row__title a:link,
.geekui-catalog-row__title a:visited {
    color: var(--geekui-text) !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}
.geekui-catalog-row__title a:hover { color: var(--geekui-accent) !important; }
.geekui-catalog-row__title-year { color: var(--geekui-text-mute) !important; font-size: 13px; font-weight: 500; }

.geekui-catalog-row__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 6px;
}
a.geekui-catalog-row__tag,
a.geekui-catalog-row__tag:link,
a.geekui-catalog-row__tag:visited {
    display: inline-block;
    padding: 2px 8px;
    background: var(--geekui-surface-2);
    border: 1px solid var(--geekui-border);
    border-radius: 4px;
    color: var(--geekui-text-dim) !important;
    font-family: var(--geekui-font-base);
    font-size: 11px;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
a.geekui-catalog-row__tag:hover { color: var(--geekui-accent) !important; border-color: var(--geekui-accent); }
.geekui-catalog-row__tag-sep { color: var(--geekui-text-mute); font-size: 9px; }

.geekui-catalog-row__sum {
    margin: 0;
    color: var(--geekui-text-dim);
    font-family: var(--geekui-font-base);
    font-size: 12.5px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.geekui-catalog-row__rate-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
.geekui-catalog-row__rate-reset {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--geekui-border);
    border-radius: 4px;
    color: var(--geekui-accent);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.geekui-catalog-row__rate-reset:disabled { cursor: default; opacity: 0.45; }
.geekui-catalog-row__rate-reset svg { width: 11px; height: 11px; }
.geekui-catalog-row__stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}
.geekui-catalog-row__star-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    flex: 0 0 auto;
}
.geekui-catalog-row__star {
    width: 14px;
    height: 14px;
    color: var(--geekui-text-mute);
    opacity: 0.4;
    pointer-events: none;
    transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.geekui-catalog-row__star--on { color: var(--geekui-accent); opacity: 1; }
.geekui-catalog-row__star-btn:hover .geekui-catalog-row__star { transform: scale(1.12); }

.geekui-catalog-row__bar {
    flex: 1 1 auto;
    min-width: 60px;
    height: 3px;
    border-radius: 2px;
    background: var(--geekui-surface-2);
    overflow: hidden;
}
.geekui-catalog-row__bar-fill {
    display: block;
    height: 100%;
    background: var(--geekui-accent);
    transition: width 0.3s ease;
}
.geekui-catalog-row__count {
    flex: 0 0 auto;
    color: var(--geekui-text-mute);
    font-family: var(--geekui-font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Score block */
.geekui-catalog-row__score {
    align-self: center;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 12px 8px;
    box-sizing: border-box;
    border: 1px solid var(--geekui-tone, var(--geekui-border));
    border-radius: 6px;
    color: var(--geekui-tone, var(--geekui-text));
}
.geekui-catalog-row__score-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--geekui-font-title);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}
.geekui-catalog-row__score-star { width: 16px; height: 16px; color: currentColor; }
.geekui-catalog-row__score-value { display: inline-block; }
.geekui-catalog-row__score-label {
    font-family: var(--geekui-font-mono);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ═══ PERSON CARD — name / char grids ════════════════════════ */
.geekui-catalog-person {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    background: var(--geekui-surface);
    border: 1px solid var(--geekui-border);
    border-radius: var(--geekui-card-radius);
    box-shadow: var(--geekui-card-shadow);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.geekui-catalog-person:hover {
    border-color: var(--geekui-accent);
    box-shadow: var(--geekui-card-hover-shadow);
}
.geekui-catalog-person__photo {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}
.geekui-catalog-person__photo-bg {
    position: absolute;
    inset: 0;
    background-size: cover !important;
    background-position: center !important;
}
.geekui-catalog-person__photo-bg img { width: 100%; height: 100%; display: block; opacity: 0.001; }

/* ── photo-less person/char → role icon + big two-letter monogram ──
   Same theme-token family as the title noposter placeholders; a theme may
   set --geekui-noposter-person / --geekui-noposter-char, otherwise both
   track the active accent. */
.geekui-catalog-person__nophoto {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .05), transparent 60%),
        var(--geekui-surface, #16151c);
}
.geekui-catalog-person__nophoto::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .16;
    background: radial-gradient(130% 90% at 50% 18%, var(--nophoto-accent, #d4a24a), transparent 62%);
    pointer-events: none;
}
.geekui-catalog-person__nophoto-icon {
    position: relative;
    z-index: 1;
    font-size: 24px;
    line-height: 1;
    color: var(--nophoto-accent, var(--geekui-accent, #d4a24a));
    opacity: .55;
}
.geekui-catalog-person__nophoto-icon svg { display: block; }
.geekui-catalog-person__nophoto-initials {
    position: relative;
    z-index: 1;
    font-weight: 800;
    font-size: 44px;
    line-height: 1;
    letter-spacing: .04em;
    color: var(--nophoto-accent, var(--geekui-accent, #d4a24a));
    text-shadow: 0 4px 18px rgba(0, 0, 0, .45);
}
.geekui-catalog-person__nophoto--person    { --nophoto-accent: var(--geekui-noposter-person, var(--geekui-accent, #d4a24a)); }
.geekui-catalog-person__nophoto--character { --nophoto-accent: var(--geekui-noposter-char,   var(--geekui-accent, #d4a24a)); }
.geekui-catalog-person__info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}
.geekui-catalog-person__role-icon {
    flex: 0 0 auto;
    display: inline-flex;
    color: var(--geekui-accent);
}
.geekui-catalog-person__info-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.geekui-catalog-person__name {
    color: var(--geekui-text);
    font-family: var(--geekui-font-title);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.geekui-catalog-person__role {
    color: var(--geekui-text-mute);
    font-family: var(--geekui-font-base);
    font-size: 11px;
}
/* corner brackets — decoration; invisible until a skin draws them */
.geekui-catalog-person__bracket { position: absolute; width: 14px; height: 14px; pointer-events: none; }
.geekui-catalog-person__bracket--tl { top: 6px; left: 6px; }
.geekui-catalog-person__bracket--br { bottom: 6px; right: 6px; }

/* ═══ A-Z INDEX — company / engine directory ═════════════════ */
.geekui-catalog-index {
    position: relative;
    box-sizing: border-box;
    padding: 24px;
    background: var(--geekui-surface);
    border: 1px solid var(--geekui-border);
    border-radius: var(--geekui-card-radius);
}
.geekui-catalog-index__bracket { position: absolute; width: 18px; height: 18px; pointer-events: none; }
.geekui-catalog-index__bracket--tl { top: 8px; left: 8px; }
.geekui-catalog-index__bracket--tr { top: 8px; right: 8px; }
.geekui-catalog-index__bracket--bl { bottom: 8px; left: 8px; }
.geekui-catalog-index__bracket--br { bottom: 8px; right: 8px; }
.geekui-catalog-index__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.geekui-catalog-index__hex { flex: 0 0 auto; color: var(--geekui-accent); }
.geekui-catalog-index__titles { flex: 1 1 auto; min-width: 0; }
.geekui-catalog-index__title {
    margin: 0;
    color: var(--geekui-text);
    font-family: var(--geekui-font-title);
    font-size: 22px;
    font-weight: 700;
}
.geekui-catalog-index__sub { margin: 2px 0 0; color: var(--geekui-text-mute); font-size: 13px; }
.geekui-catalog-index__count {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid var(--geekui-border);
}
.geekui-catalog-index__count-label {
    color: var(--geekui-text-mute);
    font-family: var(--geekui-font-mono);
    font-size: 9px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}
.geekui-catalog-index__count-value {
    color: var(--geekui-accent);
    font-family: var(--geekui-font-title);
    font-size: 22px;
    font-weight: 800;
}
.geekui-catalog-index__count-corner { position: absolute; width: 8px; height: 8px; pointer-events: none; }
.geekui-catalog-index__count-corner--tl { top: -1px; left: -1px; }
.geekui-catalog-index__count-corner--br { bottom: -1px; right: -1px; }
.geekui-catalog-index__letters { display: flex; flex-direction: column; gap: 18px; }
.geekui-catalog-index__group { display: flex; gap: 16px; }
.geekui-catalog-index__group-letter {
    flex: 0 0 32px;
    color: var(--geekui-accent);
    font-family: var(--geekui-font-title);
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}
.geekui-catalog-index__group-items {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px 16px;
}
.geekui-catalog-index__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: var(--geekui-text-dim) !important;
    text-decoration: none !important;
    transition: color 0.15s ease, background 0.15s ease;
}
.geekui-catalog-index__item:hover { color: var(--geekui-accent) !important; }
.geekui-catalog-index__item-arrow { width: 9px; height: 9px; flex: 0 0 auto; color: var(--geekui-text-mute); }
.geekui-catalog-index__item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geekui-catalog-index__footer {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid var(--geekui-border);
    color: var(--geekui-text-mute);
    font-family: var(--geekui-font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
}

/* ═══ PLATFORMS — page + logo cards ══════════════════════════ */
.geekui-catalog-platforms__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.geekui-catalog-platforms__title {
    margin: 0;
    color: var(--geekui-text);
    font-family: var(--geekui-font-title);
    font-size: 26px;
    font-weight: 800;
}
.geekui-catalog-platforms__title-tail { display: inline-block; }
.geekui-catalog-platforms__sub { margin: 4px 0 0; color: var(--geekui-text-mute); font-size: 13px; }
.geekui-catalog-platforms__icon { flex: 0 0 auto; color: var(--geekui-accent); }
.geekui-catalog-platforms__meta { margin-bottom: 20px; color: var(--geekui-text-dim); font-size: 13px; }
.geekui-catalog-platforms__meta strong { color: var(--geekui-text); }
.geekui-catalog-platforms__grid { display: grid; gap: 16px; }
.geekui-catalog-platform {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    background: var(--geekui-surface);
    border: 1px solid var(--geekui-border);
    border-radius: var(--geekui-card-radius);
    box-shadow: var(--geekui-card-shadow);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.geekui-catalog-platform:hover {
    border-color: var(--geekui-accent);
    box-shadow: var(--geekui-card-hover-shadow);
}
.geekui-catalog-platform__cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.geekui-catalog-platform__cover-bg {
    position: absolute;
    inset: 0;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}
.geekui-catalog-platform__cover-bg img { width: 100%; height: 100%; display: block; opacity: 0.001; }
.geekui-catalog-platform__body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.geekui-catalog-platform__name {
    margin: 0;
    color: var(--geekui-text);
    font-family: var(--geekui-font-title);
    font-size: 16px;
    font-weight: 700;
}
.geekui-catalog-platform__date-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.geekui-catalog-platform__date-info { display: flex; flex-direction: column; min-width: 0; }
.geekui-catalog-platform__date-label {
    color: var(--geekui-text-mute);
    font-family: var(--geekui-font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.geekui-catalog-platform__date-value { color: var(--geekui-text-dim); font-size: 13px; }
.geekui-catalog-platform__arrow { width: 12px; height: 12px; flex: 0 0 auto; color: var(--geekui-accent); }

/* ─── Loader ──────────────────────────────────────────────── */
#geekui-root-catalog .geekfp-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    color: var(--geekui-accent);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1000px) {
    .geekui-catalog-row { grid-template-columns: 100px 1fr 96px; gap: 14px; }
    .geekui-catalog-row__poster { width: 100px; }
    .geekui-catalog-row__score-top { font-size: 20px; }
}
@media (max-width: 600px) {
    #geekui-root-catalog { padding: 16px 10px 48px; }
    .geekui-catalog-row { grid-template-columns: 80px 1fr; gap: 12px; padding: 10px; }
    .geekui-catalog-row__poster { width: 80px; }
    .geekui-catalog-row__score {
        grid-column: 1 / -1;
        width: auto;
        justify-self: start;
        flex-direction: row;
        gap: 10px;
        padding: 8px 14px;
    }
    .geekui-catalog-row__title { font-size: 15px; }
}
