/* === Rex Pagan Art — Static Site Styles === */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === SYSTEM-WIDE MESSAGE TYPOGRAPHY ===
   Canonical size + line spacing for chat/message text across the whole system
   (tarot REX chat, and any future message surfaces). rexpaganart.com AND the
   Mineshaft game must use these variables for message text. */
:root {
  --rex-msg-font-size: 13px;
  --rex-msg-line-height: 1.5;
}

/* === Universal REX message box (REQ-SPEAK-0182) =========================
   One reusable chat surface: REX speaks in left bubbles (icon avatar), the
   user speaks in right bubbles. Any reading (astrology sign/daily, and future
   Mercury/Moon sub-readings, plus user-initiated questions) posts messages
   here without retooling. Matches the tarot chat: 13px / 1.5, REX green icon. */
.rex-msgbox { display: flex; flex-direction: column; gap: .7rem; overflow-y: auto; overflow-x: hidden;
  padding: .2rem .3rem .4rem 0; scrollbar-color: #6fae1a #0d0d0d; }
.rex-msgbox::-webkit-scrollbar { width: 8px; }
.rex-msgbox::-webkit-scrollbar-track { background: #0d0d0d; }
.rex-msgbox::-webkit-scrollbar-thumb { background: #3a4a1a; border-radius: 4px; }
.rex-msg { position: relative; max-width: 46ch; align-self: flex-start; text-align: left;
  font-size: var(--rex-msg-font-size, 13px); line-height: var(--rex-msg-line-height, 1.5);
  color: #d8d8d8; font-weight: 300; background: #121512; border: 1px solid #2a331b;
  border-radius: 12px 12px 12px 3px; padding: .6rem .8rem .6rem .9rem; margin-left: 2.1rem;
  opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.rex-msg.in { opacity: 1; transform: none; }
.rex-msg::before { content: ""; position: absolute; left: -2.05rem; bottom: .15rem; width: 1.5rem; height: .99rem;
  background: url("/assets/rex-icon.svg") left bottom/contain no-repeat; }
.rex-msg .rex-msg-who { display: block; color: #9DFF20; font-size: .64rem; letter-spacing: .18em;
  text-transform: uppercase; margin-bottom: .25rem; font-weight: 600; }
/* REQ-SPEAK-0184: per-message play button — halts any current reading, reads this message */
.rex-play { position: absolute; top: .4rem; right: .45rem; width: 1.5rem; height: 1.5rem; padding: 0;
  display: flex; align-items: center; justify-content: center; background: #0c120a; color: #9DFF20;
  border: 1px solid #2f3f1a; border-radius: 50%; font-size: .7rem; line-height: 1; cursor: pointer;
  opacity: .55; transition: opacity .15s, border-color .15s, box-shadow .15s; }
.rex-msg:hover .rex-play { opacity: 1; }
.rex-play:hover { border-color: #9DFF20; box-shadow: 0 0 10px rgba(157,255,32,.35); opacity: 1; }
.rex-msg p { margin: 0 0 .55em; }
.rex-msg p:last-child { margin-bottom: 0; }
.rex-msg.speaking { border-color: #9DFF20; box-shadow: 0 0 16px rgba(157,255,32,.28); }
.rex-msg .az-word.on, .rex-msg .rex-word.on { color: #9DFF20; }
/* user-initiated question bubble (REQ-SPEAK-0182 P2 conversational) */
.rex-msg.me { align-self: flex-end; margin-left: 0; margin-right: .3rem; background: #1c2412;
  border-color: #4a5f28; border-radius: 12px 12px 3px 12px; color: #eaeaea; }
.rex-msg.me::before { display: none; }
.rex-msg.me .rex-msg-who { color: #cfe89a; text-align: right; }
/* the conversational ask row pinned under the message box */
.rex-ask { display: flex; gap: .5rem; margin-top: .6rem; }
.rex-ask input { flex: 1 1 auto; background: #0c0c0c; border: 1px solid #333; color: #eee;
  border-radius: 8px; padding: .5rem .7rem; font-family: inherit; font-size: .86rem; }
.rex-ask input:focus { outline: none; border-color: #6fae1a; }
.rex-ask button { background: #9DFF20; color: #000; border: none; border-radius: 8px; font-weight: 700;
  padding: .5rem .9rem; cursor: pointer; font-family: inherit; }
.rex-ask button:hover { box-shadow: 0 0 10px rgba(157,255,32,.5); }

/* === Interested indicator + popup (DEF-0226 / REQ-SPEAK-0177) === */
.rex-interest { display: flex; align-items: center; margin-left: 1rem; }
.rex-interest[hidden] { display: none; }
.ri-btn { display: inline-flex; align-items: center; gap: .45rem; background: none; border: none; cursor: pointer; padding: .2rem .3rem; }
.ri-fan { position: relative; width: 2.5rem; height: 1.9rem; display: inline-block; }
.ri-mini { position: absolute; bottom: 0; left: calc(var(--i) * .55rem); width: 1.35rem; height: 1.9rem;
  border: 1px solid #4a5f28; border-radius: 2px; background: #0a0a0a; overflow: hidden;
  transform: rotate(calc((var(--i) - 1) * 8deg)); transform-origin: bottom center; box-shadow: 0 1px 3px #000; }
.ri-mini img { width: 100%; height: 100%; object-fit: cover; }
.ri-count { color: #9DFF20; font-weight: 700; font-size: .95rem; }
.ri-pop { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.82); display: flex;
  align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; padding: 2rem; }
.ri-pop.show { opacity: 1; }
.ri-pop-inner { background: #0c0c0c; border: 1px solid #333; border-radius: 12px; max-width: 900px;
  max-height: 86vh; overflow: auto; padding: 1rem 1.2rem; color: #ddd; width: 100%; }
.ri-pop-head { display: flex; justify-content: space-between; align-items: center; color: #9DFF20; font-weight: 700; margin-bottom: .8rem; }
.ri-pop-x, .ri-clear { background: #111; border: 1px solid #444; color: #fff; border-radius: 6px; cursor: pointer; padding: .25rem .7rem; }
.ri-pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .8rem; }
.ri-cell { position: relative; background: #141414; border: 1px solid #262626; border-radius: 6px; padding: .3rem; text-align: center; }
.ri-cell img { width: 100%; height: 130px; object-fit: contain; background: #000; }
.ri-noimg { height: 130px; background: #0a0a0a; }
.ri-cell figcaption { font-size: .62rem; color: #bbb; margin-top: .25rem; }
.ri-cell small { display: block; color: #6a6a6a; }
.ri-cx { position: absolute; top: 3px; right: 3px; background: #000a; border: 1px solid #555; color: #fff;
  border-radius: 50%; width: 1.3rem; height: 1.3rem; cursor: pointer; font-size: .8rem; line-height: 1; }
/* REQ-SPEAK-0244: per-drawing action row — Inquire / Books / Portfolios */
.ri-acts { display: flex; gap: .3rem; margin-top: .35rem; justify-content: center; flex-wrap: wrap; }
.ri-act { font-size: .58rem; text-decoration: none; font-weight: 600; border-radius: 5px;
  padding: .22rem .5rem; letter-spacing: .02em; border: 1px solid #4a5f28; color: #9DFF20; background: #0c120a; }
.ri-act.ri-act-inq { color: #000; background: #9DFF20; border-color: #9DFF20; }
.ri-act:hover { box-shadow: 0 0 10px rgba(157,255,32,.5); }
.ri-act.ri-off { color: #555; border-color: #2a2a2a; background: #0a0a0a; cursor: default; box-shadow: none; }
.ri-pop-foot { margin-top: 1rem; text-align: right; }
/* REQ-SPEAK-0176: every interested image is ringed green wherever it appears (buy area, books, portfolios) */
img.rex-interested-img { outline: 3px solid #9DFF20; outline-offset: 2px; box-shadow: 0 0 14px rgba(157,255,32,.4); }
/* REQ-SPEAK-0244: the deep-linked (?focus) drawing pulses briefly on arrival */
img.rex-focus-img { outline: 4px solid #9DFF20; outline-offset: 3px; animation: rex-focus-pulse 1s ease-in-out 3; }
@keyframes rex-focus-pulse { 0%,100% { box-shadow: 0 0 10px rgba(157,255,32,.4); } 50% { box-shadow: 0 0 34px rgba(157,255,32,.85); } }
/* portfolio link containing >=1 interested drawing (REQ-SPEAK-0176) */
a.rex-interested-portfolio { outline: 2px solid #9DFF20; outline-offset: 3px; box-shadow: 0 0 10px rgba(157,255,32,.35); border-radius: 2px; }
a.rex-interested-portfolio::after { content: "★"; color: #9DFF20; margin-left: .35em; font-size: .85em; }

/* === Searchlight — standard background beam component ===
   The site's core motif: a flashlight pool revealing content out of the dark.
   Add class `searchlight` plus ONE strength modifier to any large-background box:
     searchlight--text    faint   — behind text (stays readable)
     searchlight--image   medium  — behind images
     searchlight--bold    strong  — landing / hero
   Reposition the beam with --beam-x / --beam-y (e.g. JS cursor-follow).
   Direct children are raised above the beam automatically. */
.searchlight { position: relative; }
.searchlight::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at var(--beam-x, 50%) var(--beam-y, 45%),
    rgba(255, 255, 255, var(--beam, 0.05)) 0%,
    rgba(157, 255, 32, calc(var(--beam, 0.05) * 0.45)) 38%,
    transparent 70%);
  transition: background 0.3s ease;
}
.searchlight > * { position: relative; z-index: 1; }
.searchlight--text  { --beam: 0.022; }
.searchlight--image { --beam: 0.07; }
.searchlight--bold  { --beam: 0.16; }

/* === spotlight-layer — canonical spec: docs/spotlight-layer.md ===
   ONE zooming artwork at a time, revealed only under the cursor beam, sitting
   UNDER the menus/text. 50% intensity (full intensity is the home splash only). */
.spotlight-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  /* Intensity (off-home ceiling is 0.5). Faint behind text so it doesn't fight the
     reading; image-context pages override higher. Tune --spot-intensity to taste. */
  opacity: var(--spot-intensity, 0.2);
  -webkit-mask-image: radial-gradient(circle at var(--px, 50%) var(--py, 45%), #000 0%, #000 6%, rgba(0,0,0,0.22) 18%, transparent 34%);
  mask-image: radial-gradient(circle at var(--px, 50%) var(--py, 45%), #000 0%, #000 6%, rgba(0,0,0,0.22) 18%, transparent 34%);
}
.spotlight-layer--image { --spot-intensity: 0.4; }  /* image-context pages (e.g. hub) */
.spotlight-layer__img {
  position: absolute; inset: 0; opacity: 0;
  background-size: cover; background-position: center;
  transform: scale(1.02); transition: opacity 1.8s ease;
  will-change: opacity, transform;
}
.spotlight-layer__img.show { opacity: 1; }
.spotlight-layer__img.zoom { animation: spotlight-zoom 22s ease-out forwards; }
@keyframes spotlight-zoom { from { transform: scale(1.02); } to { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .spotlight-layer__img.zoom { animation: none; } }
/* keep page content above the spotlight */
.page-content, .site-footer { position: relative; z-index: 1; }

/* === Screensaver — global ambient mode after long inactivity ===
   The searchlight motif at full scale: a beam drifts over hidden artworks in the
   dark, revealing them one at a time. Fades in after inactivity; any input wakes. */
#rex-screensaver {
  position: fixed; inset: 0; z-index: 9999; background: #000;
  opacity: 0; visibility: hidden; cursor: none; overflow: hidden;
  transition: opacity 1.4s ease, visibility 1.4s ease;
}
#rex-screensaver.on { opacity: 1; visibility: visible; }
.rex-ss-img {
  position: absolute; inset: 0; opacity: 0;
  background-size: 100% auto;                              /* always full screen width */
  background-position: 50% var(--py, 50%);                 /* vertical pan via JS */
  background-repeat: no-repeat;
  transition: opacity 2.2s ease;
  -webkit-mask-image: radial-gradient(circle at var(--bx, 50%) var(--by, 50%), #000 0%, #000 6%, rgba(0,0,0,0.2) 17%, transparent 32%);
  mask-image: radial-gradient(circle at var(--bx, 50%) var(--by, 50%), #000 0%, #000 6%, rgba(0,0,0,0.2) 17%, transparent 32%);
}
.rex-ss-img.show { opacity: 1; }
#rex-ss-mark {
  position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%);
  color: #9DFF20; font-family: "Poppins", sans-serif; font-weight: 700;
  letter-spacing: 0.45em; font-size: 1.1rem; opacity: 0.55;
  text-shadow: 0 0 14px rgba(157,255,32,0.6); pointer-events: none;
}
#rex-ss-hint {
  position: absolute; left: 50%; bottom: 3.5%; transform: translateX(-50%);
  color: #3a3a3a; font-family: "Poppins", sans-serif; font-size: 0.68rem;
  letter-spacing: 0.25em; text-transform: uppercase; pointer-events: none;
}

:root {
  --bg: #000;
  --fg: #e0e0e0;
  --accent: #fff;
  --nav-bg: #111;
  --nav-hover: #333;
  --border: #333;
  --max-width: 1400px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  /* float over the searchlight scene: a soft top scrim, no hard bar */
  background: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.34) 55%, transparent 100%);
  border-bottom: none;
}

.logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container svg {
  width: 48px !important;
  height: auto !important;
  margin: 0 !important;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,0.85));
}

.logo-container .cls-1 {
  fill: #fff;
}

/* === NAV === */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
}

.site-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  flex-wrap: wrap;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0,0,0,0.9), 0 0 2px rgba(0,0,0,0.8);
  transition: background 0.2s;
}

.nav-list > li > a:hover,
.nav-list > li.active > a {
  /* very faint green diffuse glow behind clickable menu text */
  background: radial-gradient(ellipse at center, rgba(157,255,32,0.18) 0%, rgba(157,255,32,0.05) 55%, transparent 80%);
  text-decoration: none;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(157,255,32,0.5), 0 1px 8px rgba(0,0,0,0.9);
}

/* Mineshaft CTA — REX GREEN, bold; identical position/metrics to other nav items (DEF-0007/0009) */
.nav-list > li > a.mineshaft-cta {
  color: #9DFF20;
  font-weight: bold;
}
.nav-list > li > a.mineshaft-cta:hover {
  color: #9DFF20;
}
/* REQ-NAV-0004: Speak, REX placeholder — greyed, struck through, links to coming-soon */
.nav-list > li > a.speak-soon,
.nav-list > li > a.speak-soon:hover {
  color: #666;
  text-decoration: line-through;
}
/* REQ-NAV-0001: every 120s a black wave sweeps the letters left to right,
   each blinking out and back in; steady state stays REX GREEN */
.mineshaft-cta .ms-l {
  animation: ms-blink 120s linear infinite;
  animation-delay: calc(var(--i) * 70ms);
}
@keyframes ms-blink {
  0%, 0.15%, 0.75%, 100% { color: #9DFF20; }
  0.3%, 0.6%             { color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  .mineshaft-cta .ms-l { animation: none; }
}

/* Dropdown */
.sub-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--nav-bg);
  border: 1px solid var(--border);
  list-style: none;
  z-index: 200;
}

.has-children:hover .sub-nav {
  display: block;
}

.sub-nav li a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--fg);
  font-size: 0.8rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.sub-nav li a:hover,
.sub-nav li.active a {
  /* very faint green diffuse glow behind clickable menu text */
  background: radial-gradient(ellipse at center, rgba(157,255,32,0.16) 0%, transparent 80%);
  text-decoration: none;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(157,255,32,0.5);
}

/* === MAIN CONTENT === */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-content h1 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.page-content h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin: 1.5rem 0 0.75rem;
}

.page-content h3 {
  font-size: 1.2rem;
  color: var(--accent);
  margin: 1.25rem 0 0.5rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content strong {
  color: var(--accent);
}

.page-content em {
  font-style: italic;
}

/* === WP BLOCK COMPAT (keep existing inline styles working) === */
.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.wp-block-column {
  flex: 1;
  min-width: 250px;
}

.wp-block-group {
  margin-bottom: 1rem;
}

.wp-block-image {
  margin-bottom: 1rem;
}

.wp-block-image figcaption,
.wp-element-caption {
  font-size: 0.85rem;
  color: #999;
  margin-top: 0.5rem;
  text-align: center;
}

.wp-block-heading {
  color: var(--accent);
}

.wp-block-buttons {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.wp-block-button__link,
.wp-element-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s;
}

.wp-block-button__link:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

/* === GALLERY / CAROUSEL === */
.rex-thumb {
  max-width: 50px;
  height: auto;
  object-fit: contain;
  cursor: pointer;
  background: black;
  padding: 4px;
  border-radius: 4px;
}

.rex-zoomed {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  pointer-events: none;
}

/* === DEF-0184: the ONE shared page-header component — Row 2 is the fixed
   green back circle on the logo axis; Row 3 is the page title: one x (the
   logo column, 24px), one y, LEFT alignment, one typographic scale, with a
   standardized subtitle slot beneath. Emitted by the template on every
   non-game page; bespoke titles are stripped at build time. === */
.std-page-header { position: relative; z-index: 2; padding: 44px 24px 6px; }
.std-page-title { font-size: 1.7rem; font-weight: 700; color: #9DFF20;
  text-align: left; margin: 0; letter-spacing: .05em; line-height: 1.15;
  text-transform: none; }
.std-page-sub { color: #9a9a9a; font-size: .85rem; font-weight: 300;
  text-align: left; margin: .25rem 0 0; min-height: 0; }
main.page-content { padding-top: 10px; }

/* === DEF-0161: brand rule — the word REX is always BOLD in REX GREEN === */
.rex-name { color: #9DFF20 !important; font-weight: 700 !important; }

/* === DEF-0160/DEF-0181: site-chrome circled [<] back control — UNIFORM
   placement near the site header (same spot on every page, this ONE rule;
   top:64px matches the stories EXIT sign's below-header registration) === */
.page-back { position: fixed; left: 24px; top: 64px; z-index: 950;
  /* DEF-0184(a): left-aligned to the REX logo column (header padding 1.5rem) */
  opacity: 0.7; display: flex; align-items: center; }
.page-back:hover { opacity: 1; }
.page-back svg { display: block; }

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #666;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
  }

  .sub-nav {
    position: static;
    border: none;
    padding-left: 1rem;
  }

  .has-children:hover .sub-nav,
  .has-children .sub-nav {
    display: none;
  }

  .has-children.open .sub-nav {
    display: block;
  }

  .wp-block-columns {
    flex-direction: column;
  }

  .wp-block-column {
    min-width: 100%;
  }
}
/* === GALLERY / CAROUSEL (from gen_site.py portfolio pages) === */
.page-content:has(.gallery-header) { padding: 0; max-width: 100%; }
.gallery-header { display: flex; align-items: center; gap: 0; margin: 0.25in 0 0 0.25in; line-height: 28px; }
.gh-back { opacity: 0.7; text-decoration: none; padding-right: 10px; flex-shrink: 0; display: flex; align-items: center; }
.gh-back:hover { opacity: 1; }
.gh-divider { width: 1px; height: 40px; background: #9DFF20; margin: 0 8px; flex-shrink: 0; }
.gh-spacer { flex: 1; }
.gh-info { padding: 0; margin: 0; display: flex; flex-direction: column; justify-content: center; }
.gh-play { cursor: pointer; user-select: none; margin: 0; flex-shrink: 0; padding: 0 14px; display: flex; align-items: center; }
.gh-play svg { width: 28px; height: 28px; display: block; opacity: 0.5; transition: opacity 0.2s; }
.gh-play:hover svg { opacity: 1; }
.gh-play.running { color: #ff0000; }
.gh-play.stopped { color: #9DFF20; }
.gh-meta-col { padding: 0 0 0 8px; margin: 0; line-height: 1.3; width: 2in; min-width: 2in; flex-shrink: 0; }
h1.gallery-title { color: #9DFF20; font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.15em; margin: 0 0 2px 0 !important; padding: 0; line-height: 1; white-space: nowrap; }
.gallery-count { color: #fff; font-size: 0.8rem; line-height: 1; margin: 2px 0 0 0; }
.gallery-desc { color: #ccc; font-size: 0.85rem; line-height: 1.6; margin: 0.5rem 0.25in; max-width: 600px; }
.gallery-desc strong { color: #fff; }
.gallery-desc em { color: #ddd; }
#meta-caption { color: #9DFF20; font-size: 0.85rem; text-transform: uppercase; font-weight: bold; line-height: 1; margin: 0 0 1px 0; }
#meta-date { color: #fff; font-size: 0.8rem; line-height: 1; margin: 0 0 1px 0; }
#meta-size { color: #fff; font-size: 0.8rem; line-height: 1; margin: 0; }
#rex-gallery { display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 10px; padding: 0; margin: 0.25in; margin-top: 2mm; background: black; max-height: calc(100vh - 120px); }
.rex-thumb-wrap { width: 75px; height: 75px; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.rex-thumb { max-width: 75px; max-height: 75px; object-fit: contain; display: block; background: black; opacity: 0.4; filter: brightness(0.8); transition: opacity 0.2s ease, filter 0.2s ease; }
.rex-thumb-wrap:hover .rex-thumb, .rex-thumb-wrap.active .rex-thumb { opacity: 1; filter: none; }
.rex-thumb-wrap.active::before { content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 8px; height: 8px; background: #9DFF20; border-radius: 50%; }
#rex-canvas { position: fixed; top: 0; left: 0; z-index: 1000; display: none; cursor: pointer; }
