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

:root {
  --bg:        #080612;
  --bg2:       #0e0b20;
  --nav-h:     60px;
  --foot-h:    44px;
  --purple:    #7c3aed;
  --purple-lt: #b89ef8;
  --cyan:      #06b6d4;
  --cyan-lt:   #67e8f9;
  --name:      #c4a0ff;
  --text:      #f0ecff;
  --text-mid:  #c0b4e0;
  --text-dim:  #7a6e9a;
  --rule:      rgba(140,110,210,0.18);
  --nav-bg:    rgba(8,6,18,0.97);
  --max-w:     980px;
}

/* ─── LIGHT MODE ─────────────────────────────────────────────────── */
.light {
  --bg:        #f0ede5;
  --bg2:       #e6e2d8;
  --purple:    #5a3d8a;
  --purple-lt: #7a5ab0;
  --cyan:      #3a6e50;
  --cyan-lt:   #2e5e42;
  --name:      #3a2460;
  --text:      #1a2016;
  --text-mid:  #3d5232;
  --text-dim:  #7a9068;
  --rule:      rgba(50,70,35,0.14);
  --nav-bg:    rgba(240,237,229,0.97);
}
.light .lightbox-overlay { background: rgba(220,215,200,0.92); }
.light .modal-overlay    { background: rgba(200,195,180,0.82); }
.light .modal-card       { background: var(--bg2); }
.light .tag-filter-btn.active { background: rgba(90,61,138,0.1); }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Lora', Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- HEADER ---------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  border-bottom: 1px solid var(--rule);
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.logo-mark { width: 28px; height: 28px; opacity: 0.8; flex-shrink: 0; }
.logo-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--name);
}

nav { display: flex; gap: 0.15rem; }
.nav-link {
  padding: 0.35rem 0.85rem;
  font-family: 'Lora', serif;
  font-size: 0.92rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.nav-link:hover { color: var(--text-mid); }
.nav-link.active {
  color: var(--purple-lt);
  border-bottom-color: var(--purple-lt);
}

/* --- MAIN ------------------------------------ */
main { flex: 1; }

.page-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.8rem 2.5rem;
}

.page-header {
  margin-bottom: 2.2rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.page-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2rem;
  letter-spacing: 0.08em;
  color: var(--cyan-lt);
  flex: 1;
}
.page-sub {
  font-size: 0.92rem;
  color: var(--text-dim);
  font-style: italic;
}

/* --- FOOTER ---------------------------------- */
footer {
  height: var(--foot-h);
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}
.footer-copy {
  font-family: 'Lora', serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- BUTTONS --------------------------------- */
.btn {
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.55rem 1.3rem;
  border: 1px solid var(--rule);
  color: var(--text-dim);
  transition: color 0.18s, border-color 0.18s;
  display: inline-block;
}
.btn:hover { color: var(--purple-lt); border-color: rgba(184,158,248,0.35); }
.btn-large { font-size: 1.05rem; padding: 0.75rem 2rem; letter-spacing: 0.2em; }

/* --- LIGHTBOX -------------------------------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,2,12,0.92);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
  cursor: default;
}

/* --- 404 ------------------------------------- */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h) - var(--foot-h));
  gap: 2.5rem;
  padding: 2rem;
}
.not-found-img {
  max-width: min(420px, 90vw);
  display: block;
}

/* --- HOME ------------------------------------ */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  min-height: calc(100vh - var(--nav-h) - var(--foot-h));
  padding: 3.5rem 2.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.home-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: var(--name);
  line-height: 1.15;
  margin-bottom: 0.45rem;
}
.home-role {
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.6rem;
}
.home-bio {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 440px;
  margin-bottom: 2rem;
}
.home-bio em { color: var(--text); font-style: italic; }
.home-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.home-right {
  border-left: 1px solid var(--rule);
  padding-left: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.recent-label {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}
.recent-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s;
}
.recent-item:first-of-type { border-top: 1px solid var(--rule); }
.recent-item:hover { padding-left: 0.5rem; }
.recent-item:hover .recent-title { color: var(--purple-lt); }
.recent-kind {
  font-family: 'Lora', serif;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--purple-lt);
  margin-bottom: 0.15rem;
}
.recent-title {
  font-family: 'Lora', serif;
  font-size: 1rem;
  color: var(--text);
  transition: color 0.15s;
}
.recent-desc { font-size: 0.8rem; color: var(--text-dim); font-style: italic; }

/* --- LIST ROWS (shared) ---------------------- */
.item-list { display: flex; flex-direction: column; }
.item-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s;
}
.item-row:first-child { border-top: 1px solid var(--rule); }
.item-row:hover { padding-left: 0.8rem; }
.item-row:hover .item-title { color: var(--purple-lt); }
.item-tag {
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.item-title { font-size: 0.98rem; color: var(--text-mid); transition: color 0.15s; }
.item-meta {
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

/* --- BLOG ------------------------------------ */
.blog-list { display: flex; flex-direction: column; }
.blog-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 2rem;
  padding: 1.2rem 0.4rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s;
  align-items: start;
}
.blog-row:first-child { border-top: 1px solid var(--rule); }
.blog-row:hover { padding-left: 0.8rem; }
.blog-row:hover .blog-title { color: var(--purple-lt); }
.blog-date {
  font-family: 'Lora', serif;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding-top: 0.18rem;
  line-height: 1.5;
}
.blog-tag {
  font-family: 'Lora', serif;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--purple-lt);
  margin-bottom: 0.2rem;
}
.blog-title { font-family: 'Lora', serif; font-size: 0.98rem; color: var(--text); margin-bottom: 0.3rem; transition: color 0.15s; }
.blog-excerpt { font-size: 0.9rem; color: var(--text-dim); font-style: italic; }

/* --- STORIES --------------------------------- */
.story-list { display: flex; flex-direction: column; }
.story-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 1.2rem 0.4rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s;
  align-items: start;
}
.story-row:first-child { border-top: 1px solid var(--rule); }
.story-row:hover { padding-left: 0.8rem; }
.story-row:hover .story-title { color: var(--purple-lt); }
.story-kind {
  font-family: 'Lora', serif;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-top: 0.18rem;
}
.story-title { font-family: 'Lora', serif; font-size: 0.98rem; color: var(--text); margin-bottom: 0.25rem; transition: color 0.15s; }
.story-excerpt { font-size: 0.9rem; color: var(--text-dim); font-style: italic; }

/* --- GAMES ----------------------------------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.featured-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  background: var(--bg2);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s;
}
.featured-card:hover { border-color: rgba(184,158,248,0.4); }
.featured-card:hover .featured-title { color: var(--purple-lt); }
.featured-card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
}
.featured-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; }
.featured-tag {
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--purple-lt);
  margin-bottom: 0.4rem;
}
.featured-title { font-family: 'Lora', serif; font-size: 1.1rem; color: var(--text); transition: color 0.15s; }
.featured-desc { font-size: 0.88rem; color: var(--text-mid); font-style: italic; }

/* --- MAPS ------------------------------------ */
.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
.map-item { display: flex; flex-direction: column; gap: 0.5rem; }
.map-thumb {
  aspect-ratio: 4/3;
  background: var(--bg2);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-family: 'Lora', serif;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  overflow: hidden;
}
.map-thumb img { width: 100%; height: 100%; object-fit: cover; }
.map-placeholder { font-family: 'Lora', serif; font-size: 2rem; color: var(--text-dim); opacity: 0.4; }
.map-title {
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--purple-lt);
  text-decoration: none;
  transition: color 0.15s;
  align-self: flex-start;
}
.map-title:hover { color: var(--cyan-lt); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.map-size { font-size: 0.78rem; color: var(--text-dim); font-style: italic; }

/* --- CHARACTERS ------------------------------ */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem 1.2rem;
}
.char-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.char-thumb {
  aspect-ratio: 3/4;
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: border-color 0.15s;
  overflow: hidden;
}
.char-thumb img { width: 100%; height: 100%; object-fit: contain; }
.char-placeholder { font-family: 'Lora', serif; font-size: 1.4rem; color: var(--text-dim); opacity: 0.5; }
.char-item:hover .char-thumb { border-color: rgba(184,158,248,0.4); }
.char-name {
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--text);
  text-align: center;
  transition: color 0.15s;
}
.char-item:hover .char-name { color: var(--purple-lt); }
.char-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; }
.char-tag {
  font-family: 'Lora', serif;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--rule);
  padding: 0.1rem 0.35rem;
}

/* --- CHARACTER MODAL ------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,2,12,0.82);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--bg2);
  border: 1px solid rgba(140,110,210,0.3);
  width: 100%;
  max-width: 540px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.8rem;
  padding: 1.8rem;
  position: relative;
  animation: fadeUp 0.18s ease;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }
.modal-portrait {
  aspect-ratio: 3/4;
  background: var(--bg);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Lora', serif;
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  overflow: hidden;
}
.modal-portrait img { width: 100%; height: 100%; object-fit: cover; }
.modal-portrait-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(4,2,12,0.6);
  border: 1px solid var(--rule);
  color: var(--text-mid);
  font-size: 1.4rem;
  line-height: 1;
  width: 1.8rem;
  height: 2.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  z-index: 1;
  padding: 0;
}
.modal-arrow:hover { color: var(--text); background: rgba(4,2,12,0.85); }
.modal-prev { left: 0; }
.modal-next { right: 0; }
.modal-close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  background: none; border: none;
  color: var(--text-dim); font-size: 1rem;
  cursor: pointer; line-height: 1;
  padding: 0.2rem 0.4rem;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }
.modal-info { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.1rem; }
.modal-name { font-family: 'Lora', serif; font-size: 1.05rem; color: var(--cyan-lt); letter-spacing: 0.06em; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.modal-tag {
  font-family: 'Lora', serif; font-size: 0.52rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--purple-lt);
  border: 1px solid rgba(184,158,248,0.25); padding: 0.15rem 0.45rem;
}
.modal-divider { width: 32px; height: 1px; background: var(--rule); }
.modal-desc { font-size: 0.92rem; color: var(--text-mid); font-style: italic; line-height: 1.65; }
.modal-meta { margin-top: auto; padding-top: 0.5rem; display: flex; flex-direction: column; gap: 0.2rem; }
.modal-meta-row { display: flex; gap: 0.6rem; font-size: 0.82rem; }
.modal-meta-label {
  font-family: 'Lora', serif; font-size: 0.56rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-dim); min-width: 60px; padding-top: 0.18rem;
}
.modal-meta-val { color: var(--text-mid); }

/* --- TAG FILTER ------------------------------ */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2rem;
}
.tag-filter-btn {
  font-family: 'Lora', serif;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--rule);
  background: none;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.tag-filter-btn:hover { color: var(--text); border-color: rgba(184,158,248,0.3); }
.tag-filter-btn.active { color: var(--purple-lt); border-color: rgba(184,158,248,0.5); background: rgba(184,158,248,0.07); }

/* --- ABOUT ----------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 3.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
.about-portrait {
  aspect-ratio: 1;
  background: var(--bg2);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-body p { color: var(--text-mid); margin-bottom: 0.85rem; }
.about-body p:first-child { color: var(--text); }

.links-label {
  font-family: 'Lora', serif; font-size: 0.72rem;
  letter-spacing: 0.38em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 1.2rem;
}
.links-list { display: flex; flex-direction: column; }
.link-row {
  display: grid;
  grid-template-columns: 140px 1fr 20px;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 0.4rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s;
}
.link-row:first-child { border-top: 1px solid var(--rule); }
.link-row:hover { padding-left: 0.8rem; }
.link-row:hover .link-name { color: var(--purple-lt); }
.link-name { font-family: 'Lora', serif; font-size: 0.78rem; color: var(--text); transition: color 0.15s; }
.link-handle { font-size: 0.88rem; color: var(--text-dim); font-style: italic; }
.link-arrow { font-size: 0.7rem; color: var(--text-dim); text-align: right; }

/* --- PROSE (blog posts, stories) ------------ */
.prose-header { margin-bottom: 2.5rem; }
.prose-back {
  font-family: 'Lora', serif;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.2rem;
  transition: color 0.15s;
}
.prose-back:hover { color: var(--purple-lt); }
.prose-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--cyan-lt);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.prose-meta {
  font-family: 'Lora', serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.prose-byline {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-mid);
  margin-bottom: 0.4rem;
}
.prose-byline .byline-author { color: var(--purple-lt); font-style: normal; letter-spacing: 0.04em; }
.prose-byline .byline-sep    { color: var(--text-dim); margin: 0 0.5rem; }
.prose-rule { width: 48px; height: 1px; background: var(--rule); margin: 1.5rem 0; }
.prose-body {
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.85;
}
.prose-body p { margin-bottom: 1.2rem; }
.prose-body h2 { font-family: 'Lora', serif; font-size: 1.1rem; color: var(--text); margin: 2rem 0 0.8rem; }
.prose-body em { color: var(--text); }
.prose-body a { color: var(--purple-lt); text-underline-offset: 3px; }

.game-summary {
  font-size: 1.05rem;
  color: var(--text-mid);
  font-style: italic;
  margin-bottom: 1.5rem;
  max-width: 560px;
}
.game-prose { margin-top: 2rem; }







/* --- GRID CONTROLS (search + sort) --- */
.grid-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.grid-search {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--rule);
  color: var(--text);
  font-family: 'Lora', serif;
  font-size: 0.88rem;
  padding: 0.45rem 0.9rem;
  outline: none;
  transition: border-color 0.18s;
}
.grid-search::placeholder { color: var(--text-dim); }
.grid-search:focus { border-color: rgba(184,158,248,0.4); }
.grid-sort { display: flex; gap: 0.4rem; }
.sort-btn {
  font-family: 'Lora', serif;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--rule);
  background: none;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.sort-btn:hover { color: var(--text); border-color: rgba(184,158,248,0.3); }
.sort-btn.active { color: var(--purple-lt); border-color: rgba(184,158,248,0.5); background: rgba(184,158,248,0.07); }

/* --- THEME TOGGLE --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--rule);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  transition: color 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--purple-lt); border-color: rgba(184,158,248,0.35); }
.light .theme-toggle:hover { color: var(--purple); border-color: rgba(90,61,138,0.35); }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
.light .theme-toggle .icon-moon { display: none; }
.light .theme-toggle .icon-sun  { display: block; }
