/* ==========================================================================
   Equestria Hub — design system
   Purple/lavender theme (Catppuccin Mocha derived), shared across the OS.
   ========================================================================== */

:root {
  /* base surfaces */
  --crust: #11111b;
  --mantle: #181825;
  --base: #1e1e2e;
  --surface0: #313244;
  --surface1: #45475a;
  --surface2: #585b70;
  --overlay0: #6c7086;
  --overlay1: #7f849c;

  /* text */
  --text: #cdd6f4;
  --subtext1: #bac2de;
  --subtext0: #a6adc8;

  /* accents */
  --mauve: #cba6f7;
  --pink: #f5c2e7;
  --lavender: #b4befe;
  --blue: #89b4fa;
  --sapphire: #74c7ec;
  --teal: #94e2d5;
  --green: #a6e3a1;
  --yellow: #f9e2af;
  --peach: #fab387;
  --red: #f38ba8;
  --maroon: #eba0ac;

  --grad-primary: linear-gradient(135deg, var(--mauve), var(--pink) 55%, var(--lavender));
  --grad-glow: radial-gradient(60% 60% at 50% 40%, rgba(203,166,247,0.35), transparent 70%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 10px 30px rgba(17, 17, 27, 0.45);
  --shadow-glow: 0 0 40px rgba(203, 166, 247, 0.25);

  --header-h: 72px;
  --max-width: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(50% 40% at 15% 0%, rgba(203,166,247,0.16), transparent 60%),
    radial-gradient(45% 35% at 100% 10%, rgba(245,194,231,0.12), transparent 60%),
    radial-gradient(40% 40% at 50% 100%, rgba(137,180,250,0.10), transparent 60%),
    var(--base);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: "Inter", sans-serif; margin: 0 0 .5em; line-height: 1.15; }
p { margin: 0 0 1em; color: var(--subtext1); }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- app shell (left sidebar + top strip) ---------- */
.app-shell { display: flex; min-height: 100vh; align-items: flex-start; }

.site-sidebar {
  width: var(--sidebar-w, 232px); flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
  padding: 20px 14px; background: rgba(24, 24, 37, 0.85);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-right: 1px solid rgba(203,166,247,0.14); z-index: 150;
}
.site-sidebar .brand { padding: 4px 10px; }
.site-sidebar .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
.site-sidebar .nav-links a { padding: 10px 14px; }

.app-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }

.site-topbar {
  position: sticky; top: 0; z-index: 100; height: 64px;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 0 24px; background: rgba(24, 24, 37, 0.72);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(203,166,247,0.14);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 18px rgba(203,166,247,0.45); }
.brand-sub { display: block; font-size: .68rem; font-weight: 500; color: var(--mauve); letter-spacing: .12em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 1px; }
.nav-links a {
  padding: 8px 11px; border-radius: 999px; font-size: .88rem; font-weight: 500; white-space: nowrap;
  color: var(--subtext1); transition: background .18s, color .18s;
}
.nav-links a:hover { background: var(--surface0); color: var(--text); }
.nav-links a.active { background: var(--grad-primary); color: var(--crust); font-weight: 700; }

.nav-toggle { display: none; background: var(--surface0); border: 1px solid var(--surface1); border-radius: 10px; width: 42px; height: 42px; color: var(--text); font-size: 1.2rem; margin-right: auto; }

/* ---------- auth slot ---------- */
.auth-slot { display: flex; align-items: center; gap: 6px; }
.auth-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--grad-primary); color: var(--crust); font-weight: 700; font-size: .86rem; border: none;
}
.auth-btn:hover { filter: brightness(1.06); }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: var(--surface0); border: 1px solid var(--surface1); cursor: pointer; font-size: .85rem; color: var(--text);
}
.user-chip img { width: 28px; height: 28px; border-radius: 50%; }
.user-chip:hover { border-color: var(--mauve); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100vh;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0,0,0,0.5);
  }
  .site-sidebar.open { transform: translateX(0); }
  .brand-sub { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; text-align: center; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto -10%; height: 480px; background: var(--grad-glow); z-index: -1; filter: blur(10px); }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px;
  background: rgba(203,166,247,0.12); border: 1px solid rgba(203,166,247,0.35);
  color: var(--mauve); font-size: .82rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent;
  max-width: 900px; margin-inline: auto 0.4em;
  margin-right: auto;
  margin-left: auto;
}
.hero .lead { max-width: 680px; margin: 0 auto 34px; font-size: 1.12rem; color: var(--subtext1); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad-primary); color: var(--crust); box-shadow: var(--shadow-glow); }
.btn-primary:hover { box-shadow: 0 0 55px rgba(203,166,247,0.4); }
.btn-ghost { background: rgba(255,255,255,0.03); border-color: var(--surface1); color: var(--text); }
.btn-ghost:hover { background: var(--surface0); border-color: var(--mauve); }

/* ---------- stats ---------- */
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.stat-card {
  background: linear-gradient(160deg, var(--surface0), var(--mantle));
  border: 1px solid rgba(203,166,247,0.16); border-radius: var(--radius-md);
  padding: 20px 12px; text-align: center;
}
.stat-card .num { font-size: 1.9rem; font-weight: 800; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .label { font-size: .78rem; color: var(--subtext0); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }

/* ---------- sections / cards preview ---------- */
.section { padding: 64px 0; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.section-head p { margin: 0; }

.province-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.province-card {
  position: relative; padding: 28px 24px; border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(49,50,68,0.85), rgba(24,24,37,0.85));
  border: 1px solid var(--surface1); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.province-card:hover { transform: translateY(-6px); border-color: var(--mauve); box-shadow: var(--shadow-card); }
.province-card .icon { font-size: 2.1rem; margin-bottom: 14px; display: inline-block; }
.province-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.province-card .count { color: var(--mauve); font-weight: 700; font-size: .85rem; }

/* ---------- manifesto / about blocks ---------- */
.manifesto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.manifesto-card { padding: 24px; border-radius: var(--radius-md); background: var(--surface0); border: 1px solid var(--surface1); }
.manifesto-card .icon { font-size: 1.6rem; margin-bottom: 10px; }
.manifesto-card h4 { font-size: 1.02rem; margin-bottom: 6px; color: var(--lavender); }
.manifesto-card p { font-size: .92rem; margin: 0; }

/* ---------- catalog page toolbar ---------- */
.page-head { padding: 56px 0 28px; text-align: center; }
.page-head .eyebrow { color: var(--mauve); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { max-width: 640px; margin: 10px auto 0; }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  padding: 18px; margin-bottom: 32px; border-radius: var(--radius-md);
  background: rgba(49,50,68,0.55); border: 1px solid var(--surface1); backdrop-filter: blur(6px);
}
.search-input {
  flex: 1 1 260px; min-width: 200px; padding: 12px 16px; border-radius: 999px;
  background: var(--crust); border: 1px solid var(--surface1); color: var(--text); font-size: .95rem;
}
.search-input:focus { outline: none; border-color: var(--mauve); }
.filter-select {
  padding: 11px 14px; border-radius: 999px; background: var(--crust); border: 1px solid var(--surface1);
  color: var(--text); font-size: .88rem;
}
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--crust); border: 1px solid var(--surface1); color: var(--subtext1);
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--mauve); }
.chip.active { background: var(--grad-primary); color: var(--crust); border-color: transparent; }

.result-count { text-align: center; color: var(--subtext0); font-size: .85rem; margin-bottom: 20px; }

/* ---------- generic catalog grid & cards ---------- */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; padding-bottom: 80px; }

.item-card {
  padding: 20px; border-radius: var(--radius-md); background: var(--surface0);
  border: 1px solid var(--surface1); display: flex; flex-direction: column; gap: 10px;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.item-card:hover { transform: translateY(-4px); border-color: var(--mauve); box-shadow: var(--shadow-card); }

.item-card-top { display: flex; align-items: center; gap: 12px; }
.item-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--crust);
  background: var(--grad-primary); font-size: 1.05rem;
}
img.item-avatar { object-fit: cover; background: var(--surface1); }

.item-banner {
  width: calc(100% + 40px); aspect-ratio: 460 / 215; object-fit: cover;
  margin: -20px -20px 14px -20px; border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--surface1); display: block;
}
.item-banner-fallback {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 2rem; color: var(--crust);
}
.item-card h3 { font-size: 1.02rem; margin: 0; }
.item-card p.desc { font-size: .87rem; color: var(--subtext0); margin: 0; flex-grow: 1; }

.badge-row { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: .68rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.badge-official { background: rgba(166,227,161,0.15); color: var(--green); }
.badge-fanmade { background: rgba(203,166,247,0.15); color: var(--mauve); }
.badge-released { background: rgba(137,180,250,0.15); color: var(--blue); }
.badge-dev { background: rgba(250,179,135,0.15); color: var(--peach); }
.badge-demo { background: rgba(249,226,175,0.15); color: var(--yellow); }
.badge-cancelled { background: rgba(243,139,168,0.15); color: var(--red); }
.badge-neutral { background: var(--surface1); color: var(--subtext1); }

.link-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.link-row a {
  font-size: .82rem; font-weight: 600; padding: 7px 13px; border-radius: 999px;
  background: var(--crust); border: 1px solid var(--surface1); color: var(--lavender);
  transition: background .15s, border-color .15s;
}
.link-row a:hover { background: var(--surface1); border-color: var(--mauve); }

/* social grouped layout */
.social-group { margin-bottom: 44px; }
.social-group h2 { font-size: 1.15rem; color: var(--lavender); display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.social-group h2 .tag-count { font-size: .72rem; color: var(--subtext0); background: var(--surface0); padding: 3px 10px; border-radius: 999px; font-weight: 600; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--subtext0); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: 12px; }

/* ---------- reviews ---------- */
.review-btn {
  font-size: .82rem; font-weight: 600; padding: 7px 13px; border-radius: 999px;
  background: var(--crust); border: 1px solid var(--surface1); color: var(--yellow);
}
.review-btn:hover { background: var(--surface1); border-color: var(--mauve); }

.star-row { display: inline-flex; gap: 2px; align-items: center; }
.star-row .star { color: var(--surface2); font-size: 1.05rem; }
.star-row .star.filled { color: var(--yellow); }
.star-row.interactive .star { cursor: pointer; transition: transform .1s; }
.star-row.interactive .star:hover { transform: scale(1.15); }

.review-modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-start; justify-content: center;
  padding: 60px 16px; overflow-y: auto; background: rgba(17,17,27,0.72); backdrop-filter: blur(4px);
}
.review-modal-overlay.open { display: flex; }
.review-modal {
  position: relative; width: 100%; max-width: 560px; background: var(--mantle);
  border: 1px solid var(--surface1); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-card);
}
.review-modal-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface0); border: 1px solid var(--surface1); color: var(--text); font-size: .95rem;
}
.review-modal-close:hover { background: var(--surface1); }
.review-modal-title { font-size: 1.3rem; padding-right: 40px; margin-bottom: 6px; }
.review-modal-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.review-note { color: var(--subtext0); font-size: .88rem; }
.status-line { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--subtext0); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--overlay1); flex-shrink: 0; }
.status-dot-online { background: var(--green); box-shadow: 0 0 0 3px rgba(166,227,161,0.2); }
.review-modal-form { margin-bottom: 20px; }
.review-form { display: flex; flex-direction: column; gap: 12px; }
.review-textarea {
  width: 100%; min-height: 90px; padding: 12px 14px; border-radius: var(--radius-sm); resize: vertical;
  background: var(--crust); border: 1px solid var(--surface1); color: var(--text); font: inherit;
}
.review-textarea:focus { outline: none; border-color: var(--mauve); }
.review-modal-list { display: flex; flex-direction: column; gap: 14px; max-height: 40vh; overflow-y: auto; }
.review-item { border-top: 1px solid var(--surface0); padding-top: 14px; }
.review-item-head { display: flex; align-items: center; gap: 10px; }
.review-item-meta { flex-grow: 1; }
.review-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface1); }
.review-avatar-fallback { display: flex; align-items: center; justify-content: center; background: var(--grad-primary); color: var(--crust); font-weight: 800; font-size: .85rem; }
.review-author { font-weight: 700; font-size: .9rem; }
.profile-link { display: flex; align-items: center; gap: 10px; flex-grow: 1; min-width: 0; color: inherit; text-decoration: none; }
.profile-link:hover .review-author, .profile-link:hover h3 { text-decoration: underline; }
.review-body { margin: 8px 0 0; font-size: .88rem; color: var(--subtext1); }
.review-delete { font-size: .75rem; color: var(--red); background: transparent; border: none; padding: 4px 8px; }
.review-delete:hover { text-decoration: underline; }

/* ---------- catalog CRUD ---------- */
.add-item-btn {
  padding: 11px 20px; border-radius: 999px; background: var(--grad-primary); color: var(--crust);
  font-weight: 700; font-size: .88rem; border: none;
}
.add-item-btn:hover { filter: brightness(1.06); }
.crud-form { display: flex; flex-direction: column; gap: 14px; }
.crud-field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--subtext1); }
.crud-field input, .crud-field select, .crud-field textarea {
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--crust);
  border: 1px solid var(--surface1); color: var(--text); font: inherit;
}
.crud-field textarea { min-height: 80px; resize: vertical; }
.crud-field input:focus, .crud-field select:focus, .crud-field textarea:focus { outline: none; border-color: var(--mauve); }
.owner-line { font-size: .74rem; color: var(--overlay1); }
.owner-actions { display: flex; gap: 6px; }
.owner-actions button {
  font-size: .74rem; padding: 5px 10px; border-radius: 999px; background: var(--crust);
  border: 1px solid var(--surface1); color: var(--subtext1);
}
.owner-actions button:hover { border-color: var(--mauve); color: var(--text); }

/* ---------- feed / posts ---------- */
.post-composer { background: var(--surface0); border: 1px solid var(--surface1); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 28px; }
.post-composer textarea {
  width: 100%; min-height: 80px; padding: 12px 14px; border-radius: var(--radius-sm); resize: vertical;
  background: var(--crust); border: 1px solid var(--surface1); color: var(--text); font: inherit;
}
.post-composer textarea:focus { outline: none; border-color: var(--mauve); }
.post-composer-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.post-item { background: var(--surface0); border: 1px solid var(--surface1); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 18px; }
.post-media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 12px; }
.post-media-grid.single { grid-template-columns: 1fr; }
.post-media-item {
  border-radius: var(--radius-sm); background: var(--crust); overflow: hidden;
  display: flex; align-items: center; justify-content: center; max-height: 520px;
}
.post-media-item img, .post-media-item video {
  width: 100%; height: auto; max-height: 520px; object-fit: contain; display: block;
}
.remove-existing-file {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.remove-existing-file:hover { background: var(--red, #e64553); }

/* ---------- markdown content ---------- */
.md-body { font-size: .9rem; color: var(--subtext1); line-height: 1.55; }
.md-body p { margin: 0 0 .6em; color: inherit; }
.md-body p:last-child { margin-bottom: 0; }
.md-body a { color: var(--lavender); text-decoration: underline; }
.md-body code { background: var(--crust); padding: 1px 6px; border-radius: 4px; font-size: .85em; }
.md-body pre { background: var(--crust); padding: 10px 12px; border-radius: var(--radius-sm); overflow-x: auto; }
.md-body blockquote { border-left: 3px solid var(--mauve); margin: 0; padding-left: 12px; color: var(--subtext0); }
.md-body ul { list-style: disc; padding-left: 1.4em; margin: 0 0 .6em; }
.md-body ol { list-style: decimal; padding-left: 1.4em; margin: 0 0 .6em; }
.md-body li { margin-bottom: .2em; }
.md-body li::marker { color: var(--mauve); }
.md-body img { max-width: 100%; border-radius: var(--radius-sm); }

.chat-input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--crust); border: 1px solid var(--surface1); color: var(--text); font: inherit;
}
.chat-input:focus { outline: none; border-color: var(--mauve); }

.md-toolbar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.md-toolbar-btn {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--radius-sm);
  background: var(--crust); border: 1px solid var(--surface1); color: var(--text); font-size: .85rem;
}
.md-toolbar-btn:hover { border-color: var(--mauve); background: var(--surface1); }
.md-toolbar-preview { margin-left: auto; font-size: .78rem; color: var(--mauve); }
.md-preview { min-height: 80px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--crust); border: 1px solid var(--surface1); }

.translate-btn {
  font-size: .74rem; padding: 3px 10px; border-radius: 999px; background: transparent;
  border: 1px solid var(--surface1); color: var(--subtext0); margin-top: 6px;
}
.translate-btn:hover { border-color: var(--mauve); color: var(--text); }

/* ---------- lightbox ---------- */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  background: rgba(11,11,17,0.92); backdrop-filter: blur(6px); padding: 40px;
}
.lightbox-overlay.open { display: flex; }
/* width/height (not max-width/max-height) so a small source image actually
   scales UP to fill the viewer — object-fit:contain keeps its aspect ratio
   instead of distorting it, same as it already shrinks a big image to fit. */
/* Enlarging a low-res image forces the browser to interpolate — default
   smoothing looks soft/blurry; -webkit-optimize-contrast trades a bit of
   that softness for sharper edges (can't recover detail that isn't there). */
.lightbox-img {
  width: calc(100vw - 80px); height: calc(100vh - 80px); object-fit: contain;
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges;
}
.lightbox-close {
  position: fixed; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface0); border: 1px solid var(--surface1); color: var(--text); font-size: 1.2rem;
}
.lightbox-close:hover { background: var(--surface1); border-color: var(--mauve); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--surface0); padding: 40px 0 32px; margin-top: 40px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-brand { max-width: 340px; }
.footer-brand p { font-size: .85rem; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h5 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--mauve); margin-bottom: 10px; }
.footer-col a { display: block; font-size: .88rem; color: var(--subtext1); padding: 4px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { text-align: center; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--surface0); font-size: .78rem; color: var(--overlay1); }

/* ---------- misc ---------- */
.gradient-text { background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; background: var(--mauve); color: var(--crust); padding: 10px 16px; border-radius: 8px; z-index: 999; }
