.mediaplayer-btn, .mediaplayer-title {
  font-family: 'Courier New', monospace;
  text-rendering: auto;
}
body {
  background-color: #000000;
  color: #FFFFFF;
  font-family: Arial, Verdana, Helvetica, sans-serif;
  font-size: 13px;
  margin: 0;
  padding: 0;
  position: relative;
}
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('img/images10.gif');
  background-repeat: repeat;
  background-size: 200px;
  filter: invert(1);
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}
a:link { color: #CC0000; }
a:visited { color: #CC0000; }
a:active { color: #E4E4E4; }
strong, b { font-weight: bold; }

/* Universal drag handles */
.popup-header,
.vpopup-header,
.glossy-popup-header,
.spam-popup-bar,
.modern-popup-header,
.map-popup-header,
.ai-popup-topbar,
.ai-popup-logo,
.kiddle-header {
  cursor: grab;
  user-select: none;
}
.popup-header:active,
.vpopup-header:active,
.glossy-popup-header:active,
.spam-popup-bar:active,
.modern-popup-header:active,
.map-popup-header:active,
.ai-popup-topbar:active,
.ai-popup-logo:active,
.kiddle-header:active {
  cursor: grabbing;
}

/* Popup overlay */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* Glossary popups */
.popup {
  position: fixed;
  width: 380px;
  max-height: 80vh;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}
.popup-header {
  background: #330066;
  color: #FFFFFF;
  padding: 10px 14px;
  font-family: Arial, Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.popup-close {
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #000;
  font-size: 14px;
  font-weight: bold;
  width: 24px;
  height: 24px;
  cursor: pointer;
  text-align: center;
  line-height: 22px;
  padding: 0;
}
.popup-close:hover {
  background: #DDDDDD;
}
.popup-body {
  background: #F5F5F0;
  color: #000000;
  padding: 16px 20px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.4;
  overflow-y: auto;
  max-height: 60vh;
}
.popup-body a { color: #330066; }
.popup-body .popup-link {
  font-style: italic;
  font-size: 13px;
  margin-bottom: 12px;
  display: block;
}
@keyframes popup-squish {
  0% { transform: scale(1, 1); opacity: 1; }
  30% { transform: scale(1.15, 0.7); }
  50% { transform: scale(0.8, 1.2); }
  70% { transform: scale(1.1, 0.4); }
  100% { transform: scale(0.1, 0.05); opacity: 0; }
}
.popup.squishing, .kiddle-popup.squishing {
  animation: popup-squish 0.4s ease-in forwards;
}
.popup-trigger {
  cursor: pointer;
}

/* Vedanta-style popup (Open Individualism / Emptiness) */
.vpopup {
  position: fixed;
  width: 500px;
  z-index: 1001;
  display: none;
  border: 3px solid #556B2F;
  box-shadow: 4px 4px 0px #333;
}
.vpopup-header {
  background: linear-gradient(to bottom, #CC33CC, #990099);
  border: 2px inset #DAA520;
  padding: 8px 14px;
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 22px;
  font-weight: bold;
  font-style: italic;
  color: #FFFFFF;
  text-shadow: 2px 2px 2px #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vpopup-close {
  background: #DAA520;
  color: #000;
  border: 2px outset #DAA520;
  font-size: 12px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  cursor: pointer;
  text-align: center;
  line-height: 16px;
  padding: 0;
}
.vpopup-close:hover {
  background: #FFD700;
}
.vpopup-body {
  background: #00FFEE;
  color: #000080;
  padding: 20px 24px;
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  border: 2px inset #556B2F;
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.vpopup-text {
  flex: 1;
}
.vpopup-img {
  flex-shrink: 0;
  border: 4px solid #DAA520;
  box-shadow: 1px 1px 0 #B8860B, 2px 2px 0 #8B6914;
  outline: 2px solid #8B6914;
  max-width: 120px;
  max-height: 120px;
}
.vpopup-body .vquote-attr {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: #006400;
  font-style: italic;
}
.vpopup {
  transition: opacity 1.5s ease-out;
}
.vpopup.fading {
  opacity: 0;
}
.quote-trigger {
  cursor: pointer;
}
.quote-trigger:hover {
  text-decoration: underline;
}

/* Hover images (golden frame) */
.hover-parent {
  position: relative;
  display: inline;
}
.hover-imgs {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  z-index: 999;
  gap: 8px;
  padding-bottom: 6px;
}
.hover-parent:hover .hover-imgs {
  display: flex;
}
.hover-imgs img {
  border: 4px solid #DAA520;
  box-shadow: 1px 1px 0 #B8860B, 2px 2px 0 #8B6914;
  outline: 2px solid #8B6914;
  max-height: 150px;
}
.hover-quote {
  background: #111;
  color: #99BBFF;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
  padding: 8px 10px;
  max-width: 320px;
  border: 1px solid #333;
}

/* D'Arcy Thompson text warp (disabled) */
.dw {
  display: inline-block;
  transition: transform 5s ease-in-out, letter-spacing 5s ease-in-out, opacity 6s ease-in-out;
}

/* Spam popups (Windows XP style) */
.spam-popup {
  position: fixed;
  z-index: 9999;
  display: none;
  border: 3px outset #C0C0C0;
  box-shadow: 2px 2px 0 #000;
  cursor: default;
}
.spam-popup-bar {
  background: linear-gradient(to right, #000080, #1084D0);
  color: #FFFFFF;
  font-family: 'Tahoma', 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.spam-popup-x {
  background: #C0C0C0;
  color: #000;
  border: 2px outset #DFDFDF;
  font-size: 10px;
  font-weight: bold;
  width: 16px;
  height: 16px;
  cursor: pointer;
  text-align: center;
  line-height: 14px;
  padding: 0;
  font-family: 'Tahoma', Arial, sans-serif;
}
.spam-popup-x:active {
  border: 2px inset #DFDFDF;
}
.spam-popup img {
  display: block;
  max-width: 350px;
}

/* Kiddle-style popups */
.kiddle-popup {
  position: fixed;
  z-index: 9998;
  display: none;
  width: 420px;
  max-height: 70vh;
  border: 2px solid #DDD;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  background: #FFF;
  overflow: hidden;
}
.kiddle-header {
  background: #FFF8E8;
  padding: 8px 12px;
  border-bottom: 1px solid #EEE;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kiddle-logo {
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: bold;
}
.kiddle-logo span:nth-child(1) { color: #4285F4; }
.kiddle-logo span:nth-child(2) { color: #EA4335; }
.kiddle-logo span:nth-child(3) { color: #FBBC05; }
.kiddle-logo span:nth-child(4) { color: #4285F4; }
.kiddle-logo span:nth-child(5) { color: #34A853; }
.kiddle-logo span:nth-child(6) { color: #EA4335; }
.kiddle-nav {
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #555;
  padding: 2px 12px;
  background: #FAFAFA;
  border-bottom: 1px solid #EEE;
}
.kiddle-nav a { color: #555; text-decoration: none; margin: 0 6px; }
.kiddle-nav .kiddle-active { background: #EA4335; color: #FFF; padding: 2px 6px; border-radius: 3px; }
.kiddle-body {
  background: #FFF;
  color: #333;
  padding: 16px 20px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.6;
  max-height: 50vh;
  overflow-y: auto;
}
.kiddle-body h1 {
  font-size: 24px;
  font-weight: normal;
  margin: 0 0 4px 0;
  color: #000;
}
.kiddle-body h1 span { color: #CC0000; font-size: 32px; }
.kiddle-body .kiddle-sub { color: #0645AD; font-size: 11px; font-family: Arial, sans-serif; margin-bottom: 14px; }
.kiddle-body a { color: #0645AD; }
.kiddle-body b { color: #000; }
.kiddle-body .kiddle-toc {
  background: #F9F9F9;
  border: 1px solid #DDD;
  padding: 10px 16px;
  margin: 12px 0;
  max-width: 300px;
}
.kiddle-body .kiddle-toc-title { font-family: Arial, sans-serif; font-size: 16px; margin-bottom: 6px; }
.kiddle-body .kiddle-toc a { font-size: 12px; display: block; margin: 3px 0; }
.kiddle-body .kiddle-toc .indent { margin-left: 16px; }
.kiddle-body h2 { font-size: 18px; font-weight: normal; border-bottom: 1px solid #DDD; padding-bottom: 4px; margin-top: 16px; }
.kiddle-body ul { margin: 8px 0; padding-left: 20px; }
.kiddle-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
}
.kiddle-close:hover { color: #333; }

/* Glossy popup (Valence Realism) */
.glossy-popup {
  position: fixed;
  width: 500px;
  z-index: 1000;
  display: none;
  border: 3px solid #556B2F;
  box-shadow: 4px 4px 0px #333;
}
.glossy-popup-header {
  background: linear-gradient(to bottom, #008080, #006060);
  border: 2px inset #DAA520;
  padding: 8px 14px;
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 22px;
  font-weight: bold;
  font-style: italic;
  color: #FFFFFF;
  text-shadow: 2px 2px 2px #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.glossy-popup-close {
  background: #DAA520;
  color: #000;
  border: 2px outset #DAA520;
  font-size: 12px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  cursor: pointer;
  text-align: center;
  line-height: 16px;
  padding: 0;
}
.glossy-popup-close:hover {
  background: #FFD700;
}
.glossy-popup-body {
  background: #CCFF99;
  color: #003300;
  padding: 20px 24px;
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
  border: 2px inset #556B2F;
  max-height: 50vh;
  overflow-y: auto;
}
.glossy-popup-body a { color: #006600; }
.glossy-popup-body .glossy-term {
  color: #004400;
  font-weight: bold;
}

/* Modern popup (Prosthetics) */
@keyframes sheen {
  0% { left: -100%; }
  100% { left: 200%; }
}
.modern-popup {
  position: fixed;
  z-index: 9999;
  display: none;
  width: 360px;
  background: linear-gradient(145deg, #FF8DC7, #FF5FA2, #FF8DC7);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(255,50,130,0.3), 0 0 30px rgba(255,100,170,0.2), inset 0 2px 0 rgba(255,255,255,0.5), inset 0 -2px 4px rgba(150,0,60,0.2);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: 1px solid rgba(255,255,255,0.4);
}
.modern-popup::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  animation: sheen 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
.modern-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0));
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.modern-popup-title {
  font-size: 15px;
  font-weight: 600;
  color: #FFF;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(150,0,60,0.4);
}
.modern-popup-close {
  background: rgba(255,255,255,0.2);
  border: none;
  font-size: 22px;
  color: #FFF;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
  line-height: 1;
}
.modern-popup-close:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.1);
}
.modern-popup-body {
  padding: 0;
}
.modern-popup-img {
  display: block;
  width: 100%;
}
.modern-popup-footer {
  padding: 12px 16px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.15));
}
@keyframes blink-swipe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.swipe-btn {
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.5);
  color: #FFF;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 24px;
  border-radius: 100px;
  cursor: pointer;
  animation: blink-swipe 1.2s ease-in-out infinite;
  transition: background 0.2s, transform 0.15s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.swipe-btn:hover {
  background: rgba(255,255,255,0.4);
  transform: scale(1.05);
}

/* Map popup (modern) */
.map-popup {
  position: fixed;
  z-index: 9999;
  display: none;
  width: 400px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.06);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}
.map-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #F0F0F0;
}
.map-popup-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-popup-dot {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(34,197,94,0.5);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.map-popup-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.map-popup-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.map-popup-badge {
  font-size: 10px;
  font-weight: 700;
  color: #22C55E;
  background: #F0FDF4;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  border: 1px solid #BBF7D0;
}
.map-popup-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #9CA3AF;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  line-height: 1;
}
.map-popup-close:hover {
  background: #F3F4F6;
  color: #374151;
}
.map-popup-status {
  font-size: 12px;
  color: #6B7280;
  padding: 6px 16px;
  background: #FAFAFA;
  border-bottom: 1px solid #F0F0F0;
}
.map-popup-body {
  padding: 0;
}
.map-popup-body .leaflet-container {
  border-radius: 0 0 12px 12px;
}
@keyframes map-node-pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.8); opacity: 0; }
}
.map-pulse-ring {
  animation: map-node-pulse 2s ease-in-out infinite;
  transform-origin: center;
}

/* AI Chat popup (Vercel style) */
.ai-popup {
  position: fixed;
  z-index: 9999;
  display: none;
  width: 480px;
  height: 360px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,0,0,0.06);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: none;
}
.ai-popup { display: none; }
.ai-popup[style*="display: block"] { display: flex !important; }
.ai-popup-sidebar {
  width: 140px;
  background: #FAFAFA;
  border-right: 1px solid #EBEBEB;
  padding: 12px 0;
  flex-shrink: 0;
}
.ai-popup-logo {
  padding: 4px 14px 14px;
  display: flex;
  align-items: center;
}
.ai-popup-nav-item {
  padding: 6px 14px;
  font-size: 12px;
  color: #666;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-popup-nav-item.ai-active {
  color: #000;
  background: #F0F0F0;
  font-weight: 500;
}
.ai-popup-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ai-popup-topbar {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #EBEBEB;
}
.ai-traffic-lights {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ai-traffic-red, .ai-traffic-yellow, .ai-traffic-green {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: inline-block;
}
.ai-traffic-red {
  background: #FF5F57;
  cursor: pointer;
}
.ai-traffic-red:hover {
  background: #E04842;
}
.ai-traffic-yellow {
  background: #FEBC2E;
}
.ai-traffic-green {
  background: #28C840;
}
.ai-popup-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: #111;
}
.ai-msg-user {
  margin-bottom: 16px;
  color: #111;
}
.ai-msg-assistant {
  color: #111;
}
.ai-msg-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.ai-cursor {
  animation: cursor-blink 0.8s step-end infinite;
  color: #000;
}
.ai-popup-input {
  padding: 10px 12px;
  border-top: 1px solid #EBEBEB;
}
.ai-popup-input input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #FAFAFA;
  color: #999;
  outline: none;
  box-sizing: border-box;
}

/* Media Player popup (early 00s) */
.mediaplayer-popup {
  position: fixed;
  z-index: 9998;
  width: 340px;
  background: #2B2B3D;
  border: 2px outset #4A4A6A;
  border-radius: 6px 6px 0 0;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.6);
  overflow: hidden;
  font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
}
.mediaplayer-titlebar {
  background: linear-gradient(180deg, #3D5A99 0%, #1E2F5C 50%, #3D5A99 100%);
  color: #FFF;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: bold;
}
.mediaplayer-titlebar { cursor: grab; user-select: none; }
.mediaplayer-titlebar:active { cursor: grabbing; }
.mediaplayer-title { text-shadow: 1px 1px 1px rgba(0,0,0,0.5); }
.mediaplayer-winbtns { display: flex; gap: 2px; }
.mediaplayer-winbtn {
  background: linear-gradient(180deg, #6680B8, #3D5A8A);
  border: 1px solid #1E2F5C;
  color: #FFF;
  font-size: 10px;
  width: 18px;
  height: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 2px;
}
.mediaplayer-close { background: linear-gradient(180deg, #C86464, #8B2020); border-color: #5C1010; }
.mediaplayer-close:hover { background: linear-gradient(180deg, #E87070, #A03030); }
.mediaplayer-menubar {
  background: #2B2B3D;
  color: #9999BB;
  padding: 2px 8px;
  font-size: 10px;
  border-bottom: 1px solid #1A1A2E;
}
.mediaplayer-screen {
  background: #000;
  border: 2px inset #1A1A2E;
  margin: 4px;
}
.mediaplayer-controls {
  background: #1E1E30;
  padding: 6px 8px;
  border-top: 1px solid #3A3A55;
}
.mediaplayer-seekbar {
  height: 6px;
  background: #0A0A18;
  border: 1px inset #2B2B3D;
  border-radius: 2px;
  margin-bottom: 6px;
  overflow: hidden;
}
.mediaplayer-seekfill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #44CC44, #66EE66);
  transition: width 0.3s linear;
}
.mediaplayer-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mediaplayer-btn {
  background: linear-gradient(180deg, #3A3A55, #22223A);
  border: 1px outset #4A4A6A;
  color: #AAAACC;
  font-size: 10px;
  padding: 2px 8px;
  cursor: pointer;
  border-radius: 2px;
}
.mediaplayer-btn:hover { background: linear-gradient(180deg, #4A4A65, #32324A); }
.mediaplayer-time {
  color: #44CC44;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  margin-left: auto;
}

/* Cornell CS popup (Somatic Anti-aliasing) */
.cornell-popup {
  position: fixed;
  z-index: 9998;
  display: none;
  width: 280px;
  max-height: 60vh;
  background: #FFFFF8;
  border: 1px solid #CCC;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  overflow: hidden;
  font-family: 'Times New Roman', Georgia, serif;
}
.cornell-popup-header {
  background: #B31B1B;
  color: #FFF;
  padding: 6px 12px;
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
  user-select: none;
}
.cornell-popup-header:active { cursor: grabbing; }
.cornell-popup-close {
  background: none;
  border: none;
  color: #FFF;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.7;
}
.cornell-popup-close:hover { opacity: 1; }
.cornell-popup-body {
  padding: 16px 20px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}
.cornell-popup-body h1 {
  font-size: 22px;
  font-weight: normal;
  color: #000;
  margin: 0 0 2px 0;
  font-family: 'Times New Roman', Georgia, serif;
}
.cornell-popup-body .cornell-sub {
  color: #666;
  font-size: 13px;
  font-style: italic;
  margin: 0 0 14px 0;
  font-family: Arial, Helvetica, sans-serif;
}
.cornell-popup-body h2 {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin: 16px 0 6px 0;
  font-family: Arial, Helvetica, sans-serif;
}
.cornell-popup-body code {
  background: #F0F0F0;
  padding: 1px 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  border: 1px solid #DDD;
}
.cornell-popup-body ul {
  margin: 6px 0;
  padding-left: 20px;
}
.cornell-popup-body li {
  margin: 3px 0;
}
.cornell-popup-body a {
  color: #B31B1B;
}
.cornell-popup-body .cornell-note {
  background: #FFF8E0;
  border-left: 3px solid #E6C200;
  padding: 8px 12px;
  font-size: 13px;
  margin: 12px 0;
}
.cornell-popup-body .cornell-src {
  font-size: 11px;
  color: #999;
  font-family: Arial, Helvetica, sans-serif;
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #EEE;
}

/* Four Worldviews popup */
.worldviews-popup {
  position: fixed;
  width: 460px;
  max-height: 80vh;
  z-index: 9998;
  border: 3px solid #1A0A2E;
  box-shadow: 0 0 40px rgba(100,0,200,0.3), 4px 4px 0px #111;
  overflow: hidden;
  font-family: Georgia, 'Times New Roman', serif;
}
.worldviews-header {
  background: linear-gradient(135deg, #1A0A2E, #2D1B4E, #1A0A2E);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #DAA520;
}
.worldviews-title {
  color: #DAA520;
  font-size: 16px;
  font-weight: bold;
  font-style: italic;
  text-shadow: 1px 1px 2px #000;
  letter-spacing: 0.03em;
}
.worldviews-close {
  background: none;
  border: 1px solid rgba(218,165,32,0.4);
  color: #DAA520;
  font-size: 20px;
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background 0.2s;
}
.worldviews-close:hover {
  background: rgba(218,165,32,0.2);
}
.worldviews-steps {
  background: #0D0618;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-bottom: 1px solid #2D1B4E;
}
.worldviews-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #555;
  color: #777;
  font-size: 13px;
  font-weight: bold;
  font-family: Georgia, 'Times New Roman', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  background: transparent;
  flex-shrink: 0;
}
.worldviews-step.active {
  border-color: #DAA520;
  color: #DAA520;
  background: rgba(218,165,32,0.1);
  box-shadow: 0 0 10px rgba(218,165,32,0.3);
}
.worldviews-step.visited {
  border-color: #8B6914;
  color: #8B6914;
}
.worldviews-step:hover {
  border-color: #DAA520;
  color: #DAA520;
}
.worldviews-step-line {
  width: 30px;
  height: 2px;
  background: #333;
  flex-shrink: 0;
}
.worldviews-body {
  background: linear-gradient(180deg, #F5F0E8, #EDE5D8);
  padding: 20px 24px;
  max-height: 45vh;
  overflow-y: auto;
  color: #1A0A2E;
  font-size: 14px;
  line-height: 1.65;
}
.worldviews-card h3 {
  margin: 0 0 12px 0;
  font-size: 17px;
  color: #2D1B4E;
  border-bottom: 1px solid #C8B89A;
  padding-bottom: 6px;
  font-weight: normal;
  font-style: italic;
}
.worldviews-card p {
  margin: 0 0 10px 0;
}
.worldviews-card b {
  color: #1A0A2E;
}
.worldviews-card em {
  color: #6B3FA0;
}
.worldviews-note {
  background: rgba(218,165,32,0.1);
  border-left: 3px solid #DAA520;
  padding: 8px 12px;
  font-size: 13px;
  font-style: italic;
  color: #5A4020;
  margin-top: 12px;
}
.worldviews-source {
  text-align: center;
  padding: 8px 24px 4px;
  font-size: 11px;
  background: linear-gradient(180deg, #EDE5D8, #E5DDD0);
}
.worldviews-source a {
  color: #6B3FA0;
  text-decoration: none;
  font-style: italic;
}
.worldviews-source a:hover {
  text-decoration: underline;
}
.worldviews-footer {
  background: #0D0618;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid #DAA520;
}
.worldviews-nav-btn {
  background: transparent;
  border: 1px solid #DAA520;
  color: #DAA520;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  padding: 5px 16px;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.05em;
}
.worldviews-nav-btn:hover:not(:disabled) {
  background: rgba(218,165,32,0.15);
}
.worldviews-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.worldviews-counter {
  color: #777;
  font-size: 12px;
  font-family: Georgia, 'Times New Roman', serif;
}

/* Wake up */
#wake-up-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-style: italic;
  padding: 10px 30px;
  cursor: pointer;
  letter-spacing: 0.15em;
  transition: color 0.3s;
}
#wake-up-btn:hover {
  color: rgba(255,255,255,0.8);
}
#white-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  transition: opacity 8s ease-in;
}
#white-overlay.waking {
  opacity: 1;
  pointer-events: all;
}


/* Mobile responsive */
@media (max-width: 600px) {
  body { padding: 0 6px; }
  blockquote { margin: 0 4px; }
  img#hero-img { width: 100% !important; max-width: 547px; }
  iframe { width: 100% !important; height: auto !important; aspect-ratio: 16/9; }
  .popup { width: 90vw !important; max-width: 380px; left: 5vw !important; }
  .vpopup { width: 90vw !important; max-width: 500px; left: 5vw !important; }
  .vpopup-body { flex-direction: column; }
  .vpopup-img { max-width: 80px; max-height: 80px; }
  .glossy-popup { width: 90vw !important; max-width: 500px; left: 5vw !important; }
  .spam-popup { max-width: 90vw !important; left: 5vw !important; }
  .spam-popup img { max-width: 100% !important; }
  .kiddle-popup { width: 90vw !important; max-width: 420px; left: 5vw !important; }
  .hover-imgs { display: none !important; }
  #map-container { width: 100% !important; }
  .modern-popup { width: 90vw !important; max-width: 360px; left: 5vw !important; }
  .map-popup { width: 90vw !important; max-width: 400px; left: 5vw !important; }
  .ai-popup { width: 90vw !important; max-width: 480px; left: 5vw !important; }
  .ai-popup-sidebar { width: 100px; font-size: 10px; }
  .cornell-popup { width: 90vw !important; max-width: 280px; left: 5vw !important; }
  .worldviews-popup { width: 90vw !important; max-width: 460px; left: 5vw !important; }
  img[width="380"] { width: 90% !important; max-width: 380px; }
}
