/* =====================================================
   Canny's Archive — Shared Stylesheet
   Upload this alongside all HTML files to Neocities.
   ===================================================== */

:root {
  --brown-darkest: #3a2520;
  --brown-dark: #5a3d35;
  --brown-mid: #7d5c4d;
  --brown-warm: #a8866f;
  --cream: #e1c7ad;
  --accent-brown: #966036;
  --plum-dark: #2B1F28;
  --plum-mid: #3D2838;
  --plum-light: #8a6b7a;
  --plum-pale: #b89aac;
  --page-bg: #231820;
  --text-main: #ddd0c4;
  --border: rgba(168,134,111,0.22);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background-color: var(--page-bg);
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(90,61,53,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(61,40,56,0.25) 0%, transparent 50%);
  color: var(--text-main);
  font-family: Georgia, serif;
  display: flex;
  flex-direction: column;
}

a { color: var(--plum-pale); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cream); }

/* ── STAR CANVAS ── */
.star-canvas {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── HEADER ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background-color: var(--plum-dark);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  overflow: hidden;
}
.header-left { display: flex; flex-direction: column; position: relative; z-index: 2; }
.site-name {
  font-family: 'Courgette', cursive;
  font-size: 1.45rem;
  color: var(--cream);
  line-height: 1.1;
  text-shadow: 0 1px 8px rgba(150,96,54,0.4);
}
.site-tagline {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 0.7rem;
  color: var(--plum-pale);
  opacity: 0.8;
  letter-spacing: 0.05em;
}

/* ── HAMBURGER ── */
.hamburger {
  position: relative; z-index: 2;
  width: 36px; height: 36px;
  cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; padding: 4px; border-radius: 2px;
  transition: background 0.2s;
}
.hamburger:hover { background: rgba(168,134,111,0.1); }
.hamburger span {
  display: block; height: 1.5px;
  background: var(--cream); border-radius: 2px;
  transition: all 0.3s ease; transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── NAV DRAWER ── */
.nav-drawer {
  position: fixed;
  top: var(--header-h); right: 0;
  width: 300px;
  max-width: 85vw;
  height: calc(100vh - var(--header-h));
  background: linear-gradient(160deg, var(--brown-darkest) 0%, var(--plum-dark) 100%);
  border-left: 1px solid var(--border);
  box-shadow: -6px 0 32px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 99;
  overflow-y: auto;
  padding: 2rem 1.5rem;
}
.nav-drawer.open { transform: translateX(0); }
.nav-label {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 0.7rem; color: var(--plum-light);
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 1rem; opacity: 0.7;
}
.nav-drawer nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; }
.nav-drawer nav ul li a {
  display: block;
  font-family: 'Courgette', cursive;
  font-size: 1.05rem; color: var(--cream);
  padding: 0.65rem 0.8rem; border-radius: 2px;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}
.nav-drawer nav ul li a:hover {
  background: rgba(168,134,111,0.1);
  border-left-color: var(--accent-brown);
  color: var(--cream); padding-left: 1.2rem;
}
.nav-drawer nav ul li a.active { border-left-color: var(--accent-brown); color: var(--plum-pale); }
.nav-divider { height: 1px; background: var(--border); margin: 1rem 0; }
.nav-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45); z-index: 98;
}
.nav-overlay.open { display: block; }

/* ── PAGE BAR ── */
.page-bar {
  background: linear-gradient(90deg, var(--brown-darkest) 0%, rgba(90,61,53,0.5) 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1.5rem;
  display: flex; align-items: center; gap: 0.7rem;
}
.page-bar-lines { display: flex; flex-direction: column; gap: 3px; opacity: 0.55; }
.page-bar-lines span { display: block; height: 1.5px; background: var(--cream); border-radius: 2px; }
.page-bar-lines span:nth-child(1) { width: 16px; }
.page-bar-lines span:nth-child(2) { width: 12px; }
.page-bar-lines span:nth-child(3) { width: 8px; }
.page-bar-name {
  font-family: Georgia, serif;
  font-size: 0.75rem; color: var(--cream);
  letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75;
}
.page-bar-back {
  margin-left: auto;
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--plum-pale);
  opacity: 0.75;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.page-bar-back:hover { opacity: 1; color: var(--cream); }

/* ── MAIN ── */
main {
  flex: 1;
  max-width: 860px; width: 95%;
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}
main.wide { max-width: 1200px; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HEADING ── */
.page-heading {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: riseIn 0.9s ease both;
}
.page-heading .star-deco {
  color: var(--plum-pale); font-size: 1.1rem; letter-spacing: 0.2em;
  opacity: 0.6; margin-bottom: 0.6rem; display: block;
}
.page-heading h1 {
  font-family: 'Courgette', cursive;
  font-size: 2.4rem;
  color: var(--cream);
  text-shadow: 0 2px 14px rgba(150,96,54,0.3);
  margin-bottom: 0.3rem;
}
.page-heading p {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 0.88rem;
  color: var(--plum-pale);
  opacity: 0.8;
}

/* ── DOT DIVIDER ── */
.dot-divider {
  text-align: center; color: var(--plum-light);
  font-size: 1rem; letter-spacing: 0.45em;
  margin: 2rem 0; opacity: 0.55;
}

/* ── FOOTER ── */
footer {
  position: relative;
  background-color: var(--plum-dark);
  border-top: 1px solid var(--border);
  padding: 1.8rem 1.5rem 1.3rem;
  text-align: center; overflow: hidden;
}
.footer-inner { position: relative; z-index: 2; }
.footer-links {
  display: flex; justify-content: center; gap: 1.5rem;
  flex-wrap: wrap; margin-bottom: 0.9rem;
}
.footer-link {
  font-family: 'Courgette', cursive;
  font-size: 0.92rem; color: var(--plum-pale);
  text-decoration: none; transition: color 0.2s;
}
.footer-link:hover { color: var(--cream); }
.footer-divider {
  color: var(--plum-light); font-size: 0.8rem;
  letter-spacing: 0.35em; opacity: 0.4; margin-bottom: 0.9rem;
}
.footer-credit {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic; font-size: 0.72rem;
  color: var(--brown-mid); opacity: 0.55; letter-spacing: 0.04em;
}

/* =====================================================
   HOME PAGE
   ===================================================== */
.welcome-block {
  text-align: center; margin-bottom: 2.5rem;
  animation: riseIn 0.9s ease both;
}
.welcome-star { font-size: 1.5rem; color: var(--plum-pale); opacity: 0.65; margin-bottom: 0.7rem; }
.welcome-block h1 {
  font-family: 'Courgette', cursive;
  font-size: 2.9rem;
  color: var(--cream); margin-bottom: 0.25rem;
  text-shadow: 0 2px 14px rgba(150,96,54,0.3);
}
.welcome-subtitle {
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic; font-size: 0.93rem;
  color: var(--plum-pale); margin-bottom: 1.4rem; opacity: 0.85;
}
.welcome-message {
  max-width: 580px; margin: 0 auto;
  font-size: 0.95rem; line-height: 1.85;
  color: var(--text-main); opacity: 0.9;
  font-family: 'IM Fell English', Georgia, serif;
}

.announcement {
  background: linear-gradient(120deg, var(--accent-brown) 0%, #7a4e2a 100%);
  border: 1px solid rgba(225,199,173,0.22);
  padding: 0.9rem 1.2rem;
  margin-bottom: 2.5rem;
  display: flex; align-items: flex-start; gap: 0.9rem;
  cursor: pointer; transition: all 0.25s ease;
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
  animation: riseIn 0.9s 0.12s ease both;
}
.announcement:hover {
  border-color: rgba(225,199,173,0.38);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(150,96,54,0.3);
  color: inherit;
}
.ann-label {
  font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.15em; color: rgba(225,199,173,0.65);
  font-family: Georgia, serif; white-space: nowrap; padding-top: 0.2rem;
}
.ann-text {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.92rem; color: var(--cream); line-height: 1.5; flex: 1;
}
.ann-text strong { font-style: italic; font-weight: normal; }
.ann-arrow {
  color: rgba(225,199,173,0.55); font-size: 0.9rem;
  padding-top: 0.2rem; transition: transform 0.2s;
}
.announcement:hover .ann-arrow { transform: translateX(3px); }

.sections-block { animation: riseIn 0.9s 0.28s ease both; }
.sections-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.4rem; }
.sections-icon { width: 15px; height: 15px; border: 1.5px solid var(--accent-brown); opacity: 0.75; flex-shrink: 0; }
.sections-title { font-family: 'Courgette', cursive; font-size: 1.25rem; color: var(--cream); letter-spacing: 0.02em; }

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 0.65rem;
}
.toc-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.78rem 0.95rem;
  background: linear-gradient(120deg, rgba(90,61,53,0.22) 0%, rgba(61,40,56,0.18) 100%);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative; overflow: hidden;
}
.toc-item:hover {
  background: linear-gradient(120deg, rgba(150,96,54,0.17) 0%, rgba(90,61,53,0.23) 100%);
  border-color: rgba(150,96,54,0.38);
  transform: translateX(3px); color: var(--cream);
}
.toc-numeral { font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.8rem; color: var(--plum-pale); opacity: 0.65; min-width: 26px; }
.toc-name { font-family: 'IM Fell English', Georgia, serif; font-size: 0.95rem; color: var(--text-main); flex: 1; }
.toc-arrow { font-size: 0.72rem; color: var(--plum-light); opacity: 0.55; transition: opacity 0.2s, transform 0.2s; }
.toc-item:hover .toc-arrow { opacity: 1; transform: translateX(2px); }

/* =====================================================
   ANNOUNCEMENTS PAGE
   ===================================================== */
.announce-list { display: flex; flex-direction: column; gap: 0; }
.announce-entry {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border);
  animation: riseIn 0.9s ease both;
  position: relative;
}
.announce-entry:first-child { border-top: 1px solid var(--border); }
.entry-date {
  font-family: Georgia, serif;
  font-size: 0.7rem;
  color: var(--accent-brown);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.announce-entry h2 {
  font-family: 'Courgette', cursive;
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.announce-entry p {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.82;
  color: var(--text-main);
  opacity: 0.9;
}
.entry-sig {
  margin-top: 1rem;
  font-family: 'Courgette', cursive;
  font-size: 0.88rem;
  color: var(--plum-pale);
  opacity: 0.7;
}
.helper-note {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(120deg, rgba(58,37,32,0.4) 0%, rgba(43,31,40,0.35) 100%);
  border: 1px solid var(--border);
  border-left: 2px solid rgba(150,96,54,0.4);
  font-family: Georgia, serif;
  font-size: 0.78rem;
  color: var(--plum-pale);
  opacity: 0.75;
  line-height: 1.7;
}

/* =====================================================
   CHARACTER DETAIL PAGE
   ===================================================== */
.char-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.2rem;
  align-items: start;
  animation: riseIn 0.9s ease both;
  margin-bottom: 0.5rem;
}
.detail-polaroid {
  width: 240px;
  flex-shrink: 0;
  background: #f0e8dc;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(225,199,173,0.12);
  transform: rotate(-1.5deg);
}
.detail-polaroid-photo {
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: #c9bfb5;
  display: block;
  position: relative;
}
.detail-polaroid-photo img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.detail-polaroid-photo .photo-placeholder {
  position: absolute;
  top: 0; left: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #c4b8ae 0%, #a89b94 100%);
  color: #8a7d76;
  font-size: 0.7rem; font-family: Georgia, serif;
  letter-spacing: 0.1em; opacity: 0.7; gap: 0.4rem;
}
.detail-polaroid-photo .photo-placeholder span { font-size: 2.2rem; opacity: 0.45; }
.detail-polaroid-bottom { padding: 0.65rem 0.7rem 0.85rem; text-align: center; }
.detail-char-name {
  font-family: 'Courgette', cursive;
  font-size: 1.25rem;
  color: #3a2520;
  display: block;
}

.bio-panel { display: flex; flex-direction: column; gap: 1.2rem; padding-top: 0.3rem; }
.bio-section-label { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.bio-section-label .label-icon { width: 8px; height: 8px; border: 1.5px solid var(--accent-brown); opacity: 0.7; flex-shrink: 0; }
.bio-section-label span {
  font-family: 'IM Fell English', Georgia, serif; font-style: italic;
  font-size: 0.75rem; color: var(--plum-pale); letter-spacing: 0.1em; opacity: 0.8;
}
.bio-text {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.92rem; line-height: 1.82;
  color: var(--text-main); opacity: 0.92;
  background: linear-gradient(120deg, rgba(58,37,32,0.4) 0%, rgba(43,31,40,0.35) 100%);
  border: 1px solid var(--border);
  padding: 1rem 1.1rem;
  border-left: 2px solid rgba(150,96,54,0.4);
}
.bio-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.bio-tag {
  font-family: Georgia, serif; font-size: 0.72rem;
  padding: 0.25rem 0.7rem; border-radius: 16px;
  background: rgba(61,40,56,0.45);
  border: 1px solid rgba(138,107,122,0.38);
  color: var(--plum-pale); letter-spacing: 0.03em;
}

.series-section { animation: riseIn 0.9s 0.15s ease both; }
.series-label-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.series-label-icon { width: 10px; height: 10px; border: 1.5px solid var(--accent-brown); opacity: 0.75; flex-shrink: 0; }
.series-label-text {
  font-family: 'IM Fell English', Georgia, serif; font-style: italic;
  font-size: 0.82rem; color: var(--plum-pale); letter-spacing: 0.08em; opacity: 0.85;
}
.series-banner {
  width: 100%; border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4); overflow: hidden;
  position: relative; min-height: 120px;
  background: linear-gradient(120deg, var(--brown-darkest) 0%, var(--plum-mid) 100%);
  display: flex; align-items: center; justify-content: center;
}
.series-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.series-banner-placeholder { padding: 2.5rem 1.5rem; text-align: center; width: 100%; }
.series-banner-placeholder .series-title {
  font-family: 'Courgette', cursive; font-size: 2rem;
  color: var(--cream); text-shadow: 0 2px 12px rgba(150,96,54,0.4); margin-bottom: 0.4rem;
}
.series-banner-placeholder p { font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.82rem; color: var(--plum-pale); opacity: 0.7; }

.downloads-section { animation: riseIn 0.9s 0.25s ease both; }
.section-label-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.section-label-icon { width: 10px; height: 10px; border: 1.5px solid var(--accent-brown); opacity: 0.75; flex-shrink: 0; }
.section-label-text {
  font-family: 'IM Fell English', Georgia, serif; font-style: italic;
  font-size: 0.82rem; color: var(--plum-pale); letter-spacing: 0.08em; opacity: 0.85;
}
.download-grid { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.download-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  background: linear-gradient(120deg, rgba(90,61,53,0.4) 0%, rgba(61,40,56,0.35) 100%);
  border: 1px solid rgba(168,134,111,0.3);
  color: var(--cream); font-family: Georgia, serif; font-size: 0.8rem;
  letter-spacing: 0.05em; cursor: pointer; transition: all 0.22s ease;
  text-decoration: none;
}
.download-btn:hover {
  border-color: rgba(150,96,54,0.55);
  background: linear-gradient(120deg, rgba(150,96,54,0.28) 0%, rgba(90,61,53,0.4) 100%);
  transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.3); color: var(--cream);
}
.dl-icon { font-size: 0.75rem; opacity: 0.7; }
.dl-type { font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.7rem; color: var(--plum-pale); opacity: 0.8; }

.additional-section { animation: riseIn 0.9s 0.32s ease both; }
.additional-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; align-items: center; }
.additional-link {
  font-family: 'IM Fell English', Georgia, serif; font-style: italic;
  font-size: 0.9rem; color: var(--plum-pale); text-decoration: none;
  display: flex; align-items: center; gap: 0.3rem;
  transition: all 0.2s; padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}
.additional-link:hover { color: var(--cream); border-bottom-color: rgba(225,199,173,0.3); }
.link-star { font-size: 0.7rem; color: var(--accent-brown); opacity: 0.8; }

/* =====================================================
   CHARACTERS PAGE
   ===================================================== */
.filter-section { margin-bottom: 2.5rem; animation: riseIn 0.9s 0.15s ease both; }
.filter-block { margin-bottom: 1.4rem; }
.filter-label-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.filter-icon { width: 10px; height: 10px; border: 1.5px solid var(--accent-brown); opacity: 0.75; flex-shrink: 0; }
.filter-label { font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.82rem; color: var(--plum-pale); letter-spacing: 0.08em; opacity: 0.85; }
.filter-clear {
  margin-left: auto; font-family: Georgia, serif; font-size: 0.68rem;
  color: var(--plum-light); background: none; border: 1px solid rgba(138,107,122,0.3);
  padding: 0.2rem 0.55rem; cursor: pointer; letter-spacing: 0.06em;
  text-transform: uppercase; opacity: 0.65; transition: all 0.2s;
}
.filter-clear:hover { opacity: 1; border-color: var(--plum-light); color: var(--plum-pale); }
.tag-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag-pill {
  font-family: Georgia, serif; font-size: 0.75rem;
  padding: 0.3rem 0.8rem; border: 1px solid rgba(138,107,122,0.35);
  color: var(--plum-pale); background: rgba(61,40,56,0.3);
  cursor: pointer; border-radius: 20px; transition: all 0.2s ease;
  letter-spacing: 0.03em; user-select: none;
}
.tag-pill:hover { border-color: var(--plum-light); background: rgba(61,40,56,0.55); color: var(--cream); }
.tag-pill.active { background: var(--accent-brown); border-color: rgba(225,199,173,0.4); color: var(--cream); box-shadow: 0 2px 10px rgba(150,96,54,0.3); }
.filter-divider { height: 1px; background: var(--border); margin: 1.4rem 0; }
.no-results { display: none; text-align: center; padding: 3rem 1rem; font-family: 'IM Fell English', Georgia, serif; font-style: italic; color: var(--plum-pale); opacity: 0.65; font-size: 1rem; }

.char-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem 1.4rem;
  animation: riseIn 0.9s 0.25s ease both;
}

.char-card {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; text-decoration: none;
  transition: transform 0.28s ease;
}
.char-card:hover { transform: translateY(-4px) rotate(0.3deg); }
.char-card:hover .polaroid { box-shadow: 0 14px 40px rgba(0,0,0,0.65), 0 0 0 1px rgba(225,199,173,0.15); }

.polaroid {
  width: 100%;
  background: #f0e8dc;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(225,199,173,0.1);
  display: flex; flex-direction: column;
  transition: box-shadow 0.28s ease;
  position: relative;
}
.polaroid-photo {
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: #c9bfb5;
  display: block;
  position: relative;
  flex-shrink: 0;
}
.polaroid-photo img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.polaroid-photo .photo-placeholder {
  position: absolute; top: 0; left: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #c4b8ae 0%, #a89b94 100%);
  color: #8a7d76; font-size: 0.7rem; font-family: Georgia, serif;
  letter-spacing: 0.1em; opacity: 0.7; gap: 0.4rem;
}
.polaroid-photo .photo-placeholder span { font-size: 1.8rem; opacity: 0.5; }
.polaroid-bottom { padding: 0.55rem 0.6rem 0.7rem; text-align: center; background: #f0e8dc; flex-shrink: 0; }
.char-name-signed {
  font-family: 'Courgette', cursive; font-size: 1.05rem;
  color: #3a2520; line-height: 1.2; display: block;
}

.notecard-wrap { position: relative; width: 92%; margin-top: -16px; }
.notecard {
  background: #f5ede0; border: 1px solid rgba(150,96,54,0.18);
  padding: 0.6rem 0.65rem 0.65rem; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  position: relative;
  background-image: repeating-linear-gradient(transparent, transparent 18px, rgba(150,96,54,0.04) 18px, rgba(150,96,54,0.04) 19px);
}
.notecard-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.notecard-tag {
  font-family: Georgia, serif; font-size: 0.62rem;
  padding: 0.18rem 0.5rem; border-radius: 12px;
  background: rgba(150,96,54,0.14); border: 1px solid rgba(150,96,54,0.22);
  color: #5a3d35; letter-spacing: 0.03em; white-space: nowrap;
}

/* =====================================================
   LORE PAGE
   ===================================================== */
.lore-toc {
  background: linear-gradient(120deg, rgba(58,37,32,0.55) 0%, rgba(43,31,40,0.5) 100%);
  border: 1px solid var(--border); border-left: 2px solid rgba(150,96,54,0.5);
  padding: 1.25rem 1.5rem; margin-bottom: 2.5rem;
  animation: riseIn 0.9s 0.1s ease both;
}
.lore-toc-label { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.85rem; }
.lore-toc-label .toc-icon { width: 8px; height: 8px; border: 1.5px solid var(--accent-brown); opacity: 0.75; flex-shrink: 0; }
.lore-toc-label span { font-family: Georgia, serif; font-size: 0.7rem; color: var(--plum-pale); letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.8; }
.lore-toc ol { padding-left: 1.25rem; list-style: decimal; display: flex; flex-direction: column; gap: 0.3rem; }
.lore-toc a { color: var(--plum-pale); font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.9rem; border-bottom: 1px solid transparent; transition: all 0.2s; }
.lore-toc a:hover { color: var(--cream); border-bottom-color: rgba(225,199,173,0.25); }

.section-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.4rem; }
.section-icon { width: 12px; height: 12px; border: 1.5px solid var(--accent-brown); opacity: 0.75; flex-shrink: 0; }
.section-title { font-family: 'Courgette', cursive; font-size: 1.55rem; color: var(--cream); letter-spacing: 0.02em; }

.prose { font-family: 'IM Fell English', Georgia, serif; font-size: 0.95rem; line-height: 1.85; color: var(--text-main); opacity: 0.92; }
.prose p { margin-bottom: 1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { font-family: 'Courgette', cursive; font-size: 1.05rem; color: var(--cream); margin: 1.5rem 0 0.5rem; }
.prose h3 { font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.95rem; color: var(--plum-pale); margin: 1rem 0 0.4rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.35rem; }

blockquote {
  margin: 1.4rem 0; padding: 0.9rem 1.2rem;
  background: linear-gradient(120deg, rgba(58,37,32,0.4) 0%, rgba(43,31,40,0.35) 100%);
  border-left: 2px solid rgba(150,96,54,0.5);
  font-family: 'IM Fell English', Georgia, serif; font-style: italic;
  font-size: 0.95rem; color: var(--plum-pale); line-height: 1.75;
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.faction-card {
  background: linear-gradient(120deg, rgba(58,37,32,0.5) 0%, rgba(43,31,40,0.45) 100%);
  border: 1px solid var(--border); padding: 1.2rem 1.3rem;
  position: relative; transition: border-color 0.2s, transform 0.2s;
}
.faction-card:hover { border-color: rgba(150,96,54,0.45); transform: translateX(2px); }
.faction-card h2 { font-family: 'Courgette', cursive; font-size: 1rem; color: var(--cream); margin-bottom: 0.5rem; }
.faction-card p { font-family: 'IM Fell English', Georgia, serif; font-size: 0.86rem; line-height: 1.7; color: var(--text-main); opacity: 0.88; margin-bottom: 0.75rem; }
.card-tag { font-family: Georgia, serif; font-size: 0.65rem; padding: 0.2rem 0.55rem; border-radius: 12px; background: rgba(61,40,56,0.55); border: 1px solid rgba(138,107,122,0.35); color: var(--plum-pale); letter-spacing: 0.05em; text-transform: uppercase; }

.timeline { position: relative; padding-left: 2rem; margin-top: 0.5rem; }
.timeline-line { position: absolute; left: 0.6rem; top: 0; bottom: 0; width: 1.5px; background: var(--border); }
.timeline-entry { position: relative; margin-bottom: 1.8rem; }
.timeline-dot { position: absolute; left: -1.62rem; top: 0.4rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-brown); border: 1.5px solid rgba(225,199,173,0.3); }
.timeline-era { font-family: Georgia, serif; font-size: 0.68rem; color: var(--accent-brown); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.2rem; opacity: 0.85; }
.timeline-event { font-family: 'Courgette', cursive; font-size: 1rem; color: var(--cream); margin-bottom: 0.25rem; }
.timeline-desc { font-family: 'IM Fell English', Georgia, serif; font-size: 0.88rem; line-height: 1.75; color: var(--text-main); opacity: 0.88; }

/* =====================================================
   PROMPTS PAGE
   ===================================================== */
.page-toc {
  background: linear-gradient(120deg, rgba(58,37,32,0.55) 0%, rgba(43,31,40,0.5) 100%);
  border: 1px solid var(--border); border-left: 2px solid rgba(150,96,54,0.5);
  padding: 1.2rem 1.5rem; margin-bottom: 2.5rem;
  animation: riseIn 0.9s 0.1s ease both;
}
.page-toc-label { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; }
.page-toc-label .toc-icon { width: 8px; height: 8px; border: 1.5px solid var(--accent-brown); opacity: 0.75; flex-shrink: 0; }
.page-toc-label span { font-family: Georgia, serif; font-size: 0.7rem; color: var(--plum-pale); letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.8; }
.page-toc ol { padding-left: 1.25rem; list-style: decimal; display: flex; flex-direction: column; gap: 0.3rem; }
.page-toc a { color: var(--plum-pale); font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.9rem; border-bottom: 1px solid transparent; transition: all 0.2s; }
.page-toc a:hover { color: var(--cream); border-bottom-color: rgba(225,199,173,0.25); }

.section-desc { font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.88rem; color: var(--plum-pale); opacity: 0.8; margin-bottom: 1.5rem; line-height: 1.7; }

.search-wrap { position: relative; margin-bottom: 1.2rem; }
.search-wrap input { width: 100%; background: linear-gradient(120deg, rgba(58,37,32,0.5) 0%, rgba(43,31,40,0.45) 100%); border: 1px solid var(--border); padding: 0.65rem 1rem 0.65rem 2.5rem; font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.88rem; color: var(--text-main); outline: none; transition: border-color 0.2s; }
.search-wrap input:focus { border-color: rgba(150,96,54,0.55); }
.search-icon { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--plum-light); font-size: 1rem; pointer-events: none; opacity: 0.7; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 1.5rem; }
.filter-label-txt { font-family: Georgia, serif; font-size: 0.72rem; color: var(--plum-pale); opacity: 0.7; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 0.3rem; }
.filter-btn { font-family: Georgia, serif; font-size: 0.72rem; letter-spacing: 0.05em; padding: 0.3rem 0.8rem; border-radius: 20px; border: 1px solid rgba(138,107,122,0.35); background: rgba(61,40,56,0.3); color: var(--plum-pale); cursor: pointer; transition: all 0.2s ease; }
.filter-btn:hover { border-color: var(--plum-light); color: var(--cream); background: rgba(61,40,56,0.55); }
.filter-btn.active { background: var(--accent-brown); border-color: rgba(225,199,173,0.4); color: var(--cream); box-shadow: 0 2px 10px rgba(150,96,54,0.3); }

.prompt-count { font-family: Georgia, serif; font-size: 0.72rem; color: var(--plum-light); opacity: 0.65; margin-bottom: 1.2rem; letter-spacing: 0.05em; }
.no-results-msg { display: none; text-align: center; padding: 2.5rem 0; font-family: 'IM Fell English', Georgia, serif; font-style: italic; color: var(--plum-pale); opacity: 0.6; font-size: 1rem; }
.category-heading { font-family: 'Courgette', cursive; font-size: 1.1rem; color: var(--cream); margin: 2rem 0 0.9rem; padding-left: 0.8rem; border-left: 2px solid rgba(150,96,54,0.5); }

.prompt-card {
  background: linear-gradient(120deg, rgba(58,37,32,0.45) 0%, rgba(43,31,40,0.4) 100%);
  border: 1px solid var(--border); padding: 1.1rem 1.25rem;
  margin-bottom: 0.85rem; transition: border-color 0.2s; position: relative;
}
.prompt-card:hover { border-color: rgba(150,96,54,0.4); }
.prompt-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.55rem; }
.prompt-title { font-family: 'Courgette', cursive; font-size: 0.98rem; color: var(--cream); }
.prompt-tag { font-family: Georgia, serif; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.18rem 0.55rem; border-radius: 12px; white-space: nowrap; flex-shrink: 0; }
.tag-character { background: rgba(61,40,56,0.6); color: var(--plum-pale); border: 1px solid rgba(138,107,122,0.4); }
.tag-lore { background: rgba(58,37,32,0.6); color: #c8a07a; border: 1px solid rgba(168,134,111,0.3); }
.tag-scenario { background: rgba(43,31,40,0.6); color: var(--cream); border: 1px solid rgba(168,134,111,0.22); }
.tag-general { background: rgba(43,31,40,0.55); color: var(--plum-pale); border: 1px solid rgba(138,107,122,0.3); }
.prompt-body { font-family: 'IM Fell English', Georgia, serif; font-size: 0.88rem; color: var(--text-main); line-height: 1.75; white-space: pre-wrap; word-break: break-word; margin-bottom: 0.7rem; opacity: 0.9; }
.prompt-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.prompt-note { font-family: Georgia, serif; font-size: 0.7rem; color: var(--plum-light); font-style: italic; opacity: 0.75; }

.copy-btn { display: inline-flex; align-items: center; gap: 0.4rem; font-family: Georgia, serif; font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; padding: 0.35rem 0.85rem; border: 1px solid rgba(138,107,122,0.45); color: var(--plum-pale); background: transparent; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.copy-btn:hover { border-color: var(--plum-pale); color: var(--cream); background: rgba(61,40,56,0.4); }
.copy-btn.copied { background: rgba(80,120,90,0.2); color: #8ecfa0; border-color: rgba(142,207,160,0.4); }

.template-card { background: linear-gradient(120deg, rgba(58,37,32,0.5) 0%, rgba(43,31,40,0.45) 100%); border: 1px solid var(--border); border-left: 2px solid rgba(150,96,54,0.5); padding: 1.4rem 1.5rem; position: relative; }
.template-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.template-title { font-family: 'Courgette', cursive; font-size: 1.1rem; color: var(--cream); }
.template-tag { font-family: Georgia, serif; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 12px; background: rgba(150,96,54,0.25); color: var(--cream); border: 1px solid rgba(150,96,54,0.4); white-space: nowrap; flex-shrink: 0; }
.template-body { font-family: 'IM Fell English', Georgia, serif; font-size: 0.88rem; color: var(--text-main); line-height: 1.8; white-space: pre-wrap; word-break: break-word; margin-bottom: 0.85rem; opacity: 0.9; }
.template-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.template-note { font-family: Georgia, serif; font-size: 0.7rem; color: var(--plum-light); font-style: italic; opacity: 0.75; }

.resource-block { margin-bottom: 2rem; }
.resource-block-title { font-family: 'Courgette', cursive; font-size: 1rem; color: var(--cream); margin-bottom: 0.75rem; padding-left: 0.8rem; border-left: 2px solid rgba(150,96,54,0.5); }
.resource-list { list-style: none; display: flex; flex-direction: column; gap: 0; }
.resource-item { border-bottom: 1px solid var(--border); }
.resource-item:first-child { border-top: 1px solid var(--border); }
.resource-link {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.7rem 0.5rem; font-family: 'IM Fell English', Georgia, serif;
  font-size: 0.9rem; color: var(--plum-pale); text-decoration: none;
  transition: all 0.2s; border-left: 2px solid transparent;
}
.resource-link:hover { color: var(--cream); background: rgba(61,40,56,0.3); border-left-color: var(--accent-brown); padding-left: 0.85rem; }
.resource-link .link-star { font-size: 0.6rem; color: var(--accent-brown); opacity: 0.8; flex-shrink: 0; }
.resource-link .link-note { font-family: Georgia, serif; font-size: 0.7rem; color: var(--plum-light); opacity: 0.65; margin-left: auto; white-space: nowrap; font-style: normal; }
.resource-link .link-ext { font-size: 0.7rem; color: var(--plum-light); opacity: 0.5; flex-shrink: 0; }

/* =====================================================
   AGE GATE PAGE (body override)
   ===================================================== */
body.gate-page {
  background-color: var(--plum-dark);
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(90,61,53,0.45) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(61,40,56,0.6) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(42,31,37,0.3) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-direction: row;
}

#starfield { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 0; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gate-container {
  position: relative; z-index: 10;
  max-width: 540px; width: 90%;
  text-align: center; padding: 3rem 2.5rem 2.5rem;
  background: linear-gradient(160deg, rgba(58,37,32,0.92) 0%, rgba(43,31,40,0.95) 100%);
  border: 1px solid rgba(168,134,111,0.3);
  box-shadow: 0 0 0 1px rgba(150,96,54,0.15), 0 8px 48px rgba(0,0,0,0.6);
  animation: fadeIn 1.2s ease both;
}
.gate-container::before {
  content: ''; position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px solid rgba(168,134,111,0.12);
  pointer-events: none;
}
.gate-star-deco { font-size: 1.5rem; color: var(--plum-pale); letter-spacing: 0.15em; display: block; margin-bottom: 1.2rem; opacity: 0.75; }
.gate-title { font-family: 'Courgette', cursive; font-size: 2.8rem; color: var(--cream); line-height: 1.15; margin-bottom: 0.4rem; text-shadow: 0 2px 12px rgba(150,96,54,0.4); }
.gate-subtitle { font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 0.9rem; color: var(--plum-pale); letter-spacing: 0.04em; margin-bottom: 2rem; opacity: 0.85; }
.gate-divider { color: var(--plum-light); font-size: 0.85rem; letter-spacing: 0.35em; margin: 1.5rem 0; opacity: 0.65; }
.gate-text { font-size: 0.92rem; color: var(--cream); line-height: 1.75; margin-bottom: 0.6rem; opacity: 0.9; }
.gate-text strong { color: var(--plum-pale); font-weight: normal; font-style: italic; }
.warning-text { font-size: 0.78rem; color: var(--brown-warm); line-height: 1.6; margin-bottom: 1.8rem; opacity: 0.8; }
.btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { font-family: 'Courgette', cursive; font-size: 1rem; padding: 0.7rem 2rem; border: 1px solid; cursor: pointer; transition: all 0.25s ease; letter-spacing: 0.04em; text-decoration: none; display: inline-block; }
.btn-enter { background: var(--accent-brown); border-color: rgba(225,199,173,0.35); color: var(--cream); box-shadow: 0 4px 20px rgba(150,96,54,0.35); }
.btn-enter:hover { background: #aa6e3e; transform: translateY(-1px); box-shadow: 0 6px 28px rgba(150,96,54,0.5); color: var(--cream); }
.btn-leave { background: transparent; border-color: rgba(138,107,122,0.45); color: var(--plum-pale); }
.btn-leave:hover { background: rgba(61,40,56,0.6); border-color: var(--plum-light); transform: translateY(-1px); color: var(--plum-pale); }
.gate-footer { margin-top: 2rem; font-size: 0.72rem; color: var(--brown-mid); letter-spacing: 0.04em; opacity: 0.6; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (min-width: 640px) {
  .char-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .char-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 580px) {
  .char-hero { grid-template-columns: 1fr; justify-items: center; }
  .detail-polaroid { width: 240px; max-width: 65vw; }
  .bio-panel { padding-top: 0; }
}
@media (max-width: 480px) {
  main { padding: 1.8rem 0 3rem; }
  .char-grid { gap: 1.4rem 0.9rem; }
  .card-grid { grid-template-columns: 1fr; }
  .toc-grid { grid-template-columns: 1fr; }
  .template-header { flex-direction: column; }
  .welcome-block h1 { font-size: 2rem; }
  .gate-title { font-size: 2rem; }
}