/* emar.lol homepage — polished Y2K / GeoCities fan page, circa 2004 */
:root {
  --night: #070420;
  --navy: #120c4a;
  --box: rgba(13, 9, 52, 0.9);
  --box-hi: #b7b0ff;
  --box-lo: #2a1f78;
  --hot: #ff2fd2;
  --cyan: #00e5ff;
  --violet: #7a2cff;
  --lcd: #39ff14;
  --ms-blue: #003399;
  --ms-orange: #ff6600;
  --xp-face: #ece9d8;
  --wordart: 'Titan One', 'Arial Black', Impact, sans-serif;
  --y2k-pixel: 'Silkscreen', 'Press Start 2P', monospace;
  --trebuchet: 'Trebuchet MS', Tahoma, Verdana, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  min-height: 100vh;
  font-size: 17px;
  background: var(--night) radial-gradient(ellipse at 50% -10%, #2a0d5e 0%, #0d0636 45%, var(--night) 80%) fixed;
}
body.flipped { transform: rotate(180deg); transition: transform 1s; }
a { color: var(--cyan); }

/* ---------- tiled starfield (two parallax layers) ---------- */
.starfield { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.starfield i {
  position: absolute; left: 0; right: 0; top: -320px; height: calc(100% + 640px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='18' r='1'/%3E%3Ccircle cx='70' cy='44' r='.7' opacity='.7'/%3E%3Ccircle cx='140' cy='12' r='1.2'/%3E%3Ccircle cx='200' cy='70' r='.8' opacity='.6'/%3E%3Ccircle cx='38' cy='110' r='.6' opacity='.8'/%3E%3Ccircle cx='110' cy='96' r='1'/%3E%3Ccircle cx='170' cy='150' r='.7' opacity='.7'/%3E%3Ccircle cx='24' cy='180' r='1.1'/%3E%3Ccircle cx='90' cy='200' r='.6' opacity='.6'/%3E%3Ccircle cx='150' cy='206' r='.9'/%3E%3Ccircle cx='206' cy='190' r='.6' opacity='.7'/%3E%3Ccircle cx='60' cy='150' r='.5' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  animation: drift 90s linear infinite;
}
.starfield i + i {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cpath d='M60 40 Q60 52 72 52 Q60 52 60 64 Q60 52 48 52 Q60 52 60 40Z' fill='%23ff8ef0'/%3E%3Cpath d='M250 120 Q250 128 258 128 Q250 128 250 136 Q250 128 242 128 Q250 128 250 120Z' fill='%2380f4ff'/%3E%3Cpath d='M150 240 Q150 252 162 252 Q150 252 150 264 Q150 252 138 252 Q150 252 150 240Z' fill='%23fff6a0'/%3E%3Cpath d='M290 280 Q290 286 296 286 Q290 286 290 292 Q290 286 284 286 Q290 286 290 280Z' fill='%23fff'/%3E%3Ccircle cx='200' cy='30' r='1.6' fill='%23fff'/%3E%3Ccircle cx='20' cy='260' r='1.4' fill='%23b4ff9a'/%3E%3C/svg%3E");
  animation: drift 50s linear infinite, twinkle 3s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translateY(320px); } }
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 1; } }

#trail { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9000; }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; color: #fff;
  background: linear-gradient(180deg, #ff6ae6, #c21aa8 55%, #8a0f7a);
  border-bottom: 2px solid #ffd6f7; box-shadow: 0 2px 0 #3a0636, 0 4px 14px rgba(255, 47, 210, 0.35);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee span {
  font-family: var(--pixel); font-size: 11px; padding: 8px 0; white-space: nowrap;
  text-shadow: 1px 1px 0 #4a0640;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- site frame ---------- */
.site { max-width: 1200px; margin: 0 auto; padding: 14px 14px 0; }

/* banner */
.banner {
  position: relative; overflow: hidden; text-align: center;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 18px;
  padding: 18px 16px 14px; margin-bottom: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 40%),
    linear-gradient(120deg, #1a0b5c, #36107a 45%, #0e2a7a);
  border: 3px solid; border-color: #e3dcff #3d2a9c #1b1260 #a497ff;
  box-shadow: 0 0 0 2px #05031a, 0 0 28px rgba(122, 44, 255, 0.45);
}
.banner-glitter {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle, #ff9cf2 0 1px, transparent 1.5px),
    radial-gradient(circle, #9cf6ff 0 1px, transparent 1.5px);
  background-size: 37px 29px, 53px 41px, 61px 47px;
  background-position: 0 0, 13px 7px, 29px 19px;
  animation: twinkle 1.6s steps(2) infinite alternate;
}
.wordart {
  position: relative; margin: 0; cursor: pointer; user-select: none; line-height: 1;
  font-family: var(--wordart); font-weight: 400; font-size: clamp(34px, 7vw, 76px); letter-spacing: 0.02em;
  color: #ffd400;
  filter: drop-shadow(2px 2px 0 #b0168f) drop-shadow(2px 2px 0 #6a0a6a) drop-shadow(2px 2px 0 #3a0548) drop-shadow(0 0 14px rgba(255, 47, 210, 0.55));
}
.wordart .wl {
  display: inline-block; white-space: pre;
  background: linear-gradient(180deg, #fffbd0 0%, #ffe14a 30%, #ff9a1a 58%, #ff3fa4 82%, #c21aff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.85);
  transform: translateY(var(--y, 0)) rotate(var(--r, 0deg));
}
.wordart:active { transform: scale(0.97); }
.chrome25 { perspective: 300px; }
.chrome25 span {
  display: inline-block; font-family: var(--wordart); font-size: clamp(54px, 10vw, 112px); line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #d5e6ff 30%, #6f86b8 50%, #1d2b55 52%, #9fb8ee 70%, #ffffff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #fff;
  filter: drop-shadow(3px 3px 0 #ff2fd2) drop-shadow(0 0 16px rgba(0, 229, 255, 0.7));
  animation: spinY 4s ease-in-out infinite;
}
@keyframes spinY { 0%, 55% { transform: rotateY(0); } 80%, 100% { transform: rotateY(360deg); } }
.tagline {
  flex-basis: 100%; margin: 12px 0 0;
  font-family: var(--y2k-pixel); font-weight: 700; font-size: clamp(11px, 1.5vw, 16px); line-height: 1.35; letter-spacing: 0.02em;
  color: #b4ff9a; text-shadow: 2px 2px 0 #000;
}
.blink { animation: blink 1s steps(1) infinite; color: #fff6a0; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 3-column layout ---------- */
.layout {
  display: grid; gap: 14px; align-items: start;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
  grid-template-areas: 'left main right';
}
.side-left { grid-area: left; }
.col-main { grid-area: main; }
.side-right { grid-area: right; }
.side, .col-main { display: grid; gap: 14px; min-width: 0; }

/* beveled GeoCities box */
.box {
  background: var(--box); min-width: 0;
  border: 3px solid; border-color: var(--box-hi) var(--box-lo) #140e48 #8f84f5;
  box-shadow: 0 0 0 1px #05031a, 4px 4px 0 rgba(0, 0, 0, 0.45);
}
.box-title {
  margin: 0; padding: 6px 10px 5px;
  font-family: var(--y2k-pixel); font-weight: 700; font-size: 13px; line-height: 1.3; letter-spacing: 0.02em; color: #fff;
  background: linear-gradient(90deg, #ff2fd2, #7a2cff 55%, #1e8bff);
  border-bottom: 2px solid #05031a;
  text-shadow: 1px 1px 0 #2a0640;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
.box-title.center { text-align: center; }
.spin-star { display: inline-block; color: #fff6a0; animation: spinStar 2s linear infinite; }
@keyframes spinStar { to { transform: rotate(360deg); } }

/* nav */
.nav-list { list-style: none; margin: 0; padding: 8px 10px 10px; }
.nav-list li { padding: 4px 0; border-bottom: 1px dotted rgba(183, 176, 255, 0.35); }
.nav-list li:last-child { border: 0; }
.nav-list a {
  font-family: var(--f-xp); font-size: 14px; font-weight: 700; color: #9cf6ff; text-decoration: none;
}
.nav-list a::before { content: '✦ '; color: var(--hot); }
.nav-list a:hover { color: #fff; text-decoration: underline wavy var(--hot); }
.new {
  display: inline-block; font-family: var(--pixel); font-size: 7px; color: #fff; background: #e00;
  padding: 3px 4px 2px; transform: rotate(-8deg); animation: blink 0.8s steps(1) infinite;
}

/* hit counter */
.box-counter { text-align: center; padding-bottom: 8px; }
.box-counter .box-title { text-align: left; }
.counter-cap { margin: 8px 6px 6px; font-family: var(--f-xp); font-size: 12px; color: #d8d3ff; }
.counter-cap.tiny { font-size: 11px; opacity: 0.7; margin-top: 6px; }
.odometer {
  display: inline-flex; gap: 2px; padding: 4px; background: #000;
  border: 2px solid; border-color: #555 #ddd #ddd #555;
}
.odometer span {
  display: block; width: 20px; height: 30px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, #333, #000 45%, #000 55%, #333);
  font-family: var(--f-retro); font-size: 30px; line-height: 30px; color: #fff; text-align: center;
}
.odometer span i { display: block; font-style: normal; transition: transform 1.2s cubic-bezier(0.2, 0.9, 0.3, 1); }
.odometer span::after {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, 0.8);
}

/* blinkies (88×31 each, like the real thing) */
.blinkies { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 10px 8px; }
.blinkie {
  width: 88px; height: 31px; display: flex; align-items: center; gap: 3px; padding: 0 4px; overflow: hidden;
  border: 1px solid #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  image-rendering: pixelated;
}
.blinkie i { font-style: normal; font-size: 15px; line-height: 1; }
.blinkie b {
  flex: 1; text-align: center; font-family: var(--pixel); font-size: 6px; line-height: 1.45; font-weight: 400;
  animation: blinkieText 1.2s steps(1) infinite;
}
.b-piscola { background: linear-gradient(180deg, #ffd59e, #e8a33a); color: #4a1d00; }
.b-piscola b { --a: #4a1d00; --b: #c2185b; }
.b-lider { background: linear-gradient(180deg, #2b8cff, #0058b8); color: #ffe14a; }
.b-lider b { --a: #ffe14a; --b: #fff; }
.b-broco { background: repeating-linear-gradient(90deg, #7a0a0a 0 6px, #c9a227 6px 12px); color: #fff; }
.b-broco b { --a: #fff; --b: #ffe14a; text-shadow: 1px 1px 0 #000; }
.b-isaac { background: linear-gradient(180deg, #f6dcd0, #c79a8a); color: #3a1d1a; }
.b-isaac b { --a: #3a1d1a; --b: #2a6fa0; }
.b-wawita { background: linear-gradient(180deg, #ffd0ec, #ff8fd2); color: #8a0f7a; }
.b-wawita b { --a: #8a0f7a; --b: #fff; }
.b-cebollas { background: #000; color: #ff8fd2; }
.b-cebollas b { --a: #ff8fd2; --b: #b4ff9a; }
@keyframes blinkieText { 0% { color: var(--a); } 50% { color: var(--b); } }

/* under construction */
.construction { position: relative; display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; padding: 10px 10px 18px; }
.worker { width: 64px; height: 64px; }
.worker .shovel { transform-origin: 56px 50px; animation: dig 0.6s ease-in-out infinite alternate; }
@keyframes dig { to { transform: rotate(-22deg); } }
.construction-txt { margin: 0; font-family: var(--y2k-pixel); font-weight: 700; font-size: 12px; line-height: 1.3; color: #ffd400; text-shadow: 1px 1px 0 #000; }
.tape {
  position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(-45deg, #ffd400 0 10px, #111 10px 20px);
  background-size: 28.28px 10px; animation: tape 1s linear infinite;
}
@keyframes tape { to { background-position: 28.28px 0; } }
.updated { margin: 0; padding: 8px 10px; font-family: var(--f-xp); font-size: 11px; color: #c8c2ff; text-align: center; }

/* profile (MySpace "detalles") */
.profile { margin: 0; padding: 8px 10px 10px; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; font-family: var(--f-xp); font-size: 12px; }
.profile dt { color: #ff9cf2; font-weight: 700; }
.profile dd { margin: 0; color: #e8e5ff; }
.mood { margin: 0; padding: 0 10px 10px; font-family: var(--f-xp); font-size: 12px; color: #c8c2ff; }
.mood b { color: #fff6a0; }

/* ---------- hero ---------- */
.hero-body { text-align: center; padding: 10px 14px 16px; position: relative; }
.wawita {
  margin: 4px 0 0; font-family: var(--f-isaac-body); font-size: clamp(22px, 3vw, 30px); color: #ff8fe6;
  text-shadow: 2px 2px 0 #3a0636; transform: rotate(-3deg);
}
.broc-wrap { position: relative; width: min(270px, 64vw); margin: 0 auto -5%; }
#broccoli { width: 100%; height: auto; aspect-ratio: 1; cursor: pointer; display: block; touch-action: manipulation; }
.sp {
  position: absolute; width: 22px; height: 22px; pointer-events: none;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  background: #fff; box-shadow: 0 0 10px #fff; animation: spark 1.4s ease-in-out infinite;
}
.sp1 { top: 8%; left: 6%; background: #fff6a0; }
.sp2 { top: 18%; right: 2%; animation-delay: -0.4s; background: #9cf6ff; width: 16px; height: 16px; }
.sp3 { bottom: 14%; left: 0; animation-delay: -0.9s; background: #ff9cf2; width: 14px; height: 14px; }
.sp4 { bottom: 4%; right: 10%; animation-delay: -0.2s; }
@keyframes spark { 0%, 100% { transform: scale(0.2) rotate(0); opacity: 0.2; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
.hint { position: relative; margin: 0; font-size: 15px; color: #d8d3ff; text-shadow: 1px 1px 0 #05031a; }
#broc-count { font-family: var(--pixel); font-size: 10px; color: var(--gold); }
.cta-row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 14px 0 8px; }

/* the CTA is a Windows XP "start" button */
.hero .cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--trebuchet); font-style: italic; font-weight: 700; font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: 0.01em; color: #fff; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  padding: 12px 38px 12px 14px;
  background: linear-gradient(180deg, #7ad66f 0%, #3fa83a 10%, #2f9a2b 45%, #26881f 55%, #2f9a2b 88%, #5ec456 100%);
  border: 1px solid #0d4a0a; border-radius: 10px 34px 34px 10px;
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, 0.6), inset 0 -3px 5px rgba(0, 0, 0, 0.3), inset 3px 0 6px rgba(255, 255, 255, 0.15), 0 4px 0 #0d4a0a, 0 10px 22px rgba(0, 0, 0, 0.55), 0 0 26px rgba(124, 252, 0, 0.35);
}
.hero .cta:hover { filter: brightness(1.12); }
.hero .cta:active { transform: translateY(3px); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 1px 0 #0d4a0a; }
.cta-flag {
  display: grid; place-items: center; width: 40px; height: 40px; font-size: 24px; font-style: normal;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #e8f7ff 30%, #8fcfff 70%, #3a8ad8 100%);
  border-radius: 50%; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ---------- XP button (shared by guestbook, poll, dialogs, popups) ---------- */
.xp-btn {
  font-family: var(--f-xp); font-size: 13px; color: #000; cursor: pointer;
  min-width: 80px; padding: 5px 14px;
  background: linear-gradient(180deg, #fff 0%, #f4f3ee 60%, #e3e0d6 90%, #d6d0c5 100%);
  border: 1px solid #003c74; border-radius: 3px;
  box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.08);
}
.xp-btn:hover { box-shadow: inset 0 -2px 0 #f8b636, inset 0 2px 0 #fedf9c, inset 2px 0 0 #fbcb6f, inset -2px 0 0 #fbcb6f; }
.xp-btn:active { background: linear-gradient(180deg, #e3e0d6, #f4f3ee); }
.xp-btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.xp-btn:disabled { color: #aca899; cursor: default; }
.hero .xp-btn { font-size: 14px; padding: 8px 14px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.stat {
  display: grid; grid-template-rows: 52px auto 1fr; justify-items: center; align-items: center; gap: 6px; text-align: center; padding: 10px 8px 12px;
  color: #1a1440;
  background: linear-gradient(180deg, #ffffff 0%, #e6e3ff 50%, #c9c3f5 100%);
  border: 2px solid; border-color: #fff #6b62b8 #4a428e #fff;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}
.stat-click { cursor: pointer; }
.stat-icon { display: block; width: 52px; height: 52px; filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, 0.25)); }
.lcd {
  min-width: 70%; padding: 2px 10px 0;
  font-family: var(--f-retro); font-size: 34px; line-height: 1; color: var(--lcd);
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.7);
  background: #031a03 linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 50%);
  border: 2px solid; border-color: #222 #9a9a9a #9a9a9a #222; border-radius: 2px;
}
.stat-label { align-self: start; font-family: var(--f-xp); font-size: 12px; line-height: 1.35; font-weight: 700; }
.live { display: block; margin-top: 2px; color: #e00; font-size: 10px; white-space: nowrap; animation: blink 1.2s steps(1) infinite; }

.glass {
  position: relative; width: 30px; height: 40px; overflow: hidden;
  border: 2px solid rgba(40, 30, 90, 0.8); border-top: none; border-radius: 0 0 4px 4px;
  background: rgba(220, 240, 255, 0.7);
}
.glass-pisco { position: absolute; left: 0; right: 0; bottom: 0; height: 66%; background: linear-gradient(180deg, #e8a33a, #b86d14); }
.glass-coke { position: absolute; left: 0; right: 0; bottom: 66%; height: 20%; background: #4a1d0a; }
.glass-ice {
  position: absolute; top: 6px; left: 3px; width: 10px; height: 10px; background: rgba(255, 255, 255, 0.75);
  border: 1px solid #fff; transform: rotate(14deg); animation: bob 2s ease-in-out infinite;
}
.glass-ice.i2 { left: 14px; top: 9px; animation-delay: -1s; }
.glass-straw { position: absolute; right: 5px; top: -4px; width: 3px; height: 34px; background: var(--hot); transform: rotate(12deg); }
@keyframes bob { 50% { transform: translateY(3px) rotate(30deg); } }

/* ---------- facts ---------- */
.facts-body { display: flex; align-items: center; gap: 12px; padding: 14px; }
.breaking {
  flex: none; font-family: var(--y2k-pixel); font-weight: 700; font-size: 11px; line-height: 1.3; color: #fff; background: #d00;
  padding: 6px 6px 5px; border: 1px solid #ff9a9a; box-shadow: 2px 2px 0 #000;
  animation: breaking 1s steps(1) infinite;
}
.fact { margin: 0; flex: 1; min-height: 2.8em; font-size: clamp(16px, 1.8vw, 19px); font-weight: 700; color: #fff; display: flex; align-items: center; }
.fact.pop { animation: factPop 0.5s; }
@keyframes breaking { 50% { background: #fff6a0; color: #d00; } }
@keyframes factPop { from { transform: scale(0.85); opacity: 0; } }

/* ---------- gallery wall: Emar's pinned notes + one post-it per guestbook signature ---------- */
.wall-title { display: flex; justify-content: space-between; gap: 10px; }
.wall-count { font-weight: 400; white-space: nowrap; }
.wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 30px 22px; align-items: start; justify-items: center;
  padding: 26px 20px 34px;
}
.postit {
  width: 200px; margin: 0; padding: 14px 14px 16px; transform: rotate(2deg);
  background: linear-gradient(180deg, #fff59a, #ffe65c); color: #3a2a00; box-shadow: 3px 5px 0 rgba(0, 0, 0, 0.45);
  font-family: var(--f-isaac-body); font-size: 18px; line-height: 1.25;
}
.postit b { display: block; font-family: var(--f-isaac); font-weight: 400; font-size: 19px; margin-bottom: 6px; color: #c2185b; }
.postit ul { margin: 0; padding-left: 18px; }
.polaroid {
  margin: 0; background: #fff; padding: 8px 8px 0; width: 170px; box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.5);
  transform: rotate(-3deg);
}
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; display: block; background: #ddd; }
.polaroid figcaption { font-family: var(--f-isaac-body); font-size: 17px; color: #222; text-align: center; padding: 6px 0 8px; }
.wall-empty { grid-column: span 2; width: auto; max-width: 300px; transform: rotate(-1.5deg); font-size: 17px; }

.wall-note {
  position: relative; width: 100%; max-width: 210px; min-height: 150px; margin: 0; padding: 18px 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper, #ffe97a) 70%, #fff), var(--paper, #ffe97a));
  color: #2b2100; box-shadow: 3px 5px 0 rgba(0, 0, 0, 0.45); transform: rotate(var(--tilt, 1deg));
  font-family: var(--f-isaac-body); transition: transform 0.15s;
}
.wall-note::before { /* masking tape */
  content: ''; position: absolute; top: -9px; left: 50%; width: 64px; height: 18px; translate: -50% 0; rotate: -3deg;
  background: rgba(255, 255, 240, 0.6); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.wall-note:hover { transform: rotate(0) scale(1.03); z-index: 2; }
.wall-note.fresh { animation: noteIn 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes noteIn { from { transform: translateY(-40px) rotate(-12deg) scale(1.2); opacity: 0; } }
.wall-stamp { position: absolute; top: 6px; right: 8px; font-size: 22px; line-height: 1; }
.wall-msg { margin: 0; padding-right: 18px; font-size: 18px; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; }
.wall-by { margin-top: auto; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.wall-name { font-family: var(--f-isaac); font-size: 17px; color: #c2185b; overflow-wrap: anywhere; }
.wall-date { font-family: var(--f-xp); font-size: 10px; color: rgba(43, 33, 0, 0.6); }
/* the photo: a polaroid taped below the note, hanging off its bottom-right corner */
.wall-note.has-pic { margin-bottom: 18px; }
.wall-pic {
  position: relative; display: block; align-self: flex-end; width: 150px; max-width: 85%; margin: 4px -16px -30px 0; padding: 6px 6px 16px;
  background: #fff; border: 0; box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.4); rotate: 4deg; cursor: zoom-in;
}
.wall-pic::before {
  content: ''; position: absolute; top: -8px; left: 50%; width: 48px; height: 16px; translate: -50% 0; rotate: 6deg;
  background: rgba(255, 255, 240, 0.65); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.wall-pic:focus-visible { outline: 2px dotted #fff; outline-offset: 3px; }
.wall-pic img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #eee; }
@media (prefers-reduced-motion: reduce) {
  .wall-note, .wall-note.fresh { transition: none; animation: none; }
}

/* ---------- guestbook (2004 hosted guestbook look) ---------- */
.gb-inner { background: #f2f0ff; color: #1b1650; padding: 14px; font-family: var(--f-xp); }
.gb-sub { margin: 0 0 12px; font-size: 14px; }
.gb-form { display: grid; gap: 8px; border: 1px solid #7a72c9; background: #fff; padding: 0 12px 12px; margin-bottom: 16px; }
.gb-formhead { margin: 0 -12px 4px; padding: 6px 10px; background: linear-gradient(180deg, #4a3fc0, #2c2290); color: #fff; font-weight: 700; font-size: 13px; }
.gb-row { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: start; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; position: relative; }
.gb-lab { font-weight: 700; font-size: 13px; padding-top: 7px; padding-inline: 0; float: left; }
.gb-field { display: grid; gap: 2px; }
.gb-form input, .gb-form textarea {
  font: 15px var(--f-xp); color: #000; width: 100%; padding: 6px 8px; background: #fff;
  border: 1px solid #7f9db9; border-radius: 0;
}
.gb-form input:focus, .gb-form textarea:focus { outline: 2px solid #f8b636; outline-offset: 0; }
.gb-form textarea { resize: vertical; }
.gb-count { font-size: 11px; justify-self: end; color: #666; }
.gb-stamps legend { float: left; }
#gb-stamps { display: flex; gap: 4px; flex-wrap: wrap; }
.stamp-opt { position: relative; }
.stamp-opt input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.stamp-opt span {
  display: grid; place-items: center; width: 40px; height: 40px; font-size: 22px; cursor: pointer;
  background: linear-gradient(180deg, #fff, #e6e3ff); border: 1px solid #b3acf0; border-radius: 3px;
}
.stamp-opt input:checked + span { border: 2px solid #ff6600; background: #fff3c4; box-shadow: 0 0 6px #ffb347; }
.stamp-opt input:focus-visible + span { outline: 2px dotted #000; }
/* photo picker: real file input hidden inside an XP button, preview as a tiny polaroid */
.gb-photo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.gb-preview { position: relative; display: inline-block; background: #fff; padding: 4px 4px 12px; box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.35); border: 1px solid #ccc; transform: rotate(-3deg); }
.gb-preview[hidden] { display: none; }
.gb-preview img { display: block; width: 64px; height: 64px; object-fit: cover; }
.gb-unpick {
  position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid #fff; background: radial-gradient(circle at 35% 30%, #f08a6c, #c2300c); color: #fff; font: 700 11px/1 Arial, sans-serif;
}
.gb-hint { font-size: 11px; color: #6b65a0; }
.gb-lightbox::backdrop { background: rgba(10, 6, 40, 0.85); }
.gb-lightbox img { display: block; max-width: 100%; max-height: 76vh; margin: 0 auto; }
.gb-lightbox-cap { margin: 8px 0; font-family: var(--comic); font-size: 18px; color: #111; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gb-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-left: 90px; }
.xp-primary { font-weight: 700; padding: 6px 18px; }
.gb-status { margin: 0; font-size: 13px; font-weight: 700; color: #1a7a1a; }
.gb-status.err { color: #c00; }

/* ---------- Winamp (2.x classic skin) ---------- */
.winamp {
  font-family: var(--f-xp); user-select: none; color: #00e000;
  background: linear-gradient(180deg, #3f3f5c, #29293d);
  border: 2px solid; border-color: #6c6c8f #15151f #15151f #6c6c8f;
  box-shadow: 0 0 0 1px #000, 4px 4px 0 rgba(0, 0, 0, 0.45);
}
.wa-title { display: flex; align-items: center; gap: 6px; height: 16px; padding: 0 3px 0 6px; background: linear-gradient(180deg, #34345a, #1c1c34); }
.wa-grip { flex: 1; height: 8px; background: repeating-linear-gradient(180deg, #c9c07c 0 1px, #4f4a26 1px 2px); }
.wa-name { font-family: var(--pixel); font-size: 7px; letter-spacing: 0.15em; color: #e6dfa0; }
.wa-tbtns { display: flex; gap: 2px; }
.wa-tbtns i { width: 9px; height: 9px; background: linear-gradient(180deg, #a5a5c0, #5f5f7a); border: 1px solid #111; }
.wa-body { padding: 5px 6px 6px; }
.wa-lcd { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 5px; }
.wa-left { background: #000; border: 1px solid; border-color: #15151f #6c6c8f #6c6c8f #15151f; padding: 3px 4px 2px; }
.wa-clock { display: flex; align-items: center; justify-content: space-between; height: 24px; }
.wa-ind { width: 8px; height: 8px; background: #2a2a2a; }
.wa-ind.play { width: 0; height: 0; background: none; border-left: 7px solid #00e000; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.wa-ind.pause { width: 7px; height: 8px; background: linear-gradient(90deg, #ffa500 0 2px, transparent 2px 5px, #ffa500 5px); }
.wa-time { font-family: var(--f-retro); font-size: 28px; line-height: 1; color: #00e000; text-shadow: 0 0 4px rgba(0, 224, 0, 0.6); letter-spacing: 0.04em; }
.wa-time.blinking { animation: blink 1s steps(1) infinite; }
#wa-vis { display: block; width: 100%; height: 24px; image-rendering: pixelated; }
.wa-right { display: grid; gap: 4px; align-content: start; min-width: 0; }
.wa-scroll { background: #000; border: 1px solid; border-color: #15151f #6c6c8f #6c6c8f #15151f; overflow: hidden; height: 18px; }
.wa-scroll-track { display: flex; width: max-content; animation: marquee 14s steps(140) infinite; }
.wa-scroll-track span { font-family: var(--f-retro); font-size: 16px; line-height: 17px; white-space: pre; color: #00e000; }
.wa-info { display: flex; align-items: center; gap: 2px; font-family: var(--f-retro); font-size: 12px; color: #b7d6b7; white-space: nowrap; overflow: hidden; }
.wa-box { background: #000; color: #00e000; padding: 0 2px; border: 1px solid #15151f; }
.wa-ms { margin-left: 1px; color: #3a5a3a; }
.wa-ms.on { color: #00e000; }
.winamp.oculto .wa-scroll-track span, .winamp.oculto .wa-time { color: #7fe3ff; text-shadow: 0 0 4px rgba(127, 227, 255, 0.6); }
.winamp.oculto .wa-ind.play { border-left-color: #7fe3ff; }
.wa-sliders { display: flex; gap: 6px; align-items: center; }
.wa-vol-wrap { flex: 1; display: flex; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#wa-vol { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin: 0; background: linear-gradient(90deg, #1f7a1f, #d8d81f 70%, #d81f1f); border: 1px solid #000; border-radius: 0; cursor: pointer; }
#wa-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; background: linear-gradient(180deg, #e6e6f0, #8a8aa0); border: 1px solid #000; }
#wa-vol::-moz-range-thumb { width: 12px; height: 12px; background: linear-gradient(180deg, #e6e6f0, #8a8aa0); border: 1px solid #000; border-radius: 0; }
.wa-bal { flex: none; width: 30px; height: 8px; background: linear-gradient(90deg, #d81f1f, #1f7a1f 50%, #d81f1f); border: 1px solid #000; position: relative; }
.wa-bal::after { content: ''; position: absolute; left: 8px; top: -3px; width: 12px; height: 12px; background: linear-gradient(180deg, #e6e6f0, #8a8aa0); border: 1px solid #000; }
.wa-seek { position: relative; height: 10px; margin: 6px 0; background: #121220; border: 1px solid; border-color: #15151f #6c6c8f #6c6c8f #15151f; }
.wa-thumb { position: absolute; top: -1px; left: 0; width: 28px; height: 10px; background: linear-gradient(180deg, #e8e2a0, #8a8450); border: 1px solid #000; }
.wa-controls { display: flex; align-items: center; gap: 0; }
.wa-btn {
  width: 23px; height: 18px; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(180deg, #d8d8e6, #9a9ab4 60%, #7a7a94);
  border: 1px solid; border-color: #f2f2ff #3a3a50 #3a3a50 #f2f2ff;
}
.wa-btn svg { width: 12px; height: 9px; fill: #20203a; }
.wa-btn:active, .wa-btn.on { background: linear-gradient(180deg, #7a7a94, #b0b0c8); border-color: #3a3a50 #f2f2ff #f2f2ff #3a3a50; }
.wa-btn:focus-visible { outline: 1px dotted #fff; outline-offset: 1px; }
#wa-play { box-shadow: 0 0 0 0 rgba(0, 224, 0, 0.8); animation: waGlow 1.6s ease-out infinite; }
.winamp.is-playing #wa-play { animation: none; }
@keyframes waGlow { 70% { box-shadow: 0 0 0 6px rgba(0, 224, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 224, 0, 0); } }
.wa-toggles { display: flex; gap: 2px; margin-left: 6px; }
.wa-toggles i { font-style: normal; font-family: var(--f-retro); font-size: 11px; line-height: 12px; padding: 1px 3px; color: #6a6a8a; background: #1c1c2e; border: 1px solid #000; }
.wa-toggles i.on { color: #00e000; }
.wa-bolt { margin-left: auto; font-size: 14px; filter: hue-rotate(10deg) saturate(1.5); }
.wa-hint { margin: 0; padding: 3px 6px 4px; font-family: var(--y2k-pixel); font-size: 10px; line-height: 1.4; color: #e6dfa0; background: #1c1c34; border-top: 1px solid #000; animation: blink 1.4s steps(1) infinite; }
.winamp.is-playing .wa-hint { animation: none; color: #6a6a8a; }

/* ---------- poll ---------- */
.poll { display: grid; gap: 6px; padding: 10px 12px 12px; font-family: var(--f-xp); font-size: 13px; color: #e8e5ff; }
.poll-q { margin: 0 0 2px; font-weight: 700; color: #fff6a0; }
.poll label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.poll .xp-btn { justify-self: start; margin-top: 4px; }
.poll-res { display: grid; gap: 6px; margin-top: 6px; }
.poll-bar { font-size: 12px; }
.poll-bar div { height: 10px; margin-top: 2px; background: #1b1260; border: 1px solid #8f84f5; }
.poll-bar div i { display: block; height: 100%; background: linear-gradient(90deg, var(--hot), var(--gold)); width: 0; transition: width 1s; }
.poll-note { font-size: 11px; color: #b7b0ff; font-style: italic; margin: 2px 0 0; }

/* ---------- Subway Surfers phone ---------- */
.runner-panel { position: sticky; top: 12px; justify-self: center; width: 172px; text-align: center; }
.phone {
  position: relative; padding: 10px 7px; border-radius: 26px; background: #121212;
  box-shadow: inset 0 0 0 2px #3a3a3a, 0 0 0 2px #8a8a8a, 0 0 0 4px #1a1a1a, 6px 8px 18px rgba(0, 0, 0, 0.6);
}
.phone-notch { position: absolute; top: 3px; left: 50%; width: 46px; height: 5px; border-radius: 3px; background: #2a2a2a; transform: translateX(-50%); }
#runner { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 14px; background: #6ec6ff; }
.fg-clip { position: absolute; top: 10px; left: 7px; width: calc(100% - 14px); height: calc(50% - 10px); object-fit: cover; border-radius: 14px 14px 0 0; background: #000; border-bottom: 2px solid #000; }
.fg-clip[hidden] { display: none; }

/* ---------- webring + footer ---------- */
.webring {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin: 18px 0 0; padding: 10px; text-align: center;
  background: linear-gradient(180deg, #2b1a7a, #140c4a);
  border: 3px ridge #b7b0ff;
}
.ring-btn {
  font-family: var(--f-xp); font-size: 12px; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #8f84f5, #4a3fc0); border: 2px outset #c9c3ff; padding: 4px 10px;
}
.ring-btn:active { border-style: inset; }
.ring-name { flex-basis: 100%; order: -1; font-family: var(--f-xp); font-size: 13px; font-weight: 700; color: #fff6a0; display: grid; }
.ring-name small { font-weight: 400; font-size: 10px; color: #b7b0ff; }
.footer { text-align: center; padding: 18px 16px 130px; color: #c8c2ff; font-family: var(--f-xp); font-size: 13px; }
.footer p { margin: 6px 0; }
.tiny { font-size: 11px; opacity: 0.8; }
.badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.badge88 {
  width: 88px; height: 31px; display: grid; place-content: center; overflow: hidden;
  font-family: Verdana, sans-serif; font-size: 7px; line-height: 1.2; text-align: center;
  border: 1px solid #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.badge88 b { font-size: 8px; white-space: nowrap; letter-spacing: -0.02em; }
.b-ie { background: linear-gradient(180deg, #fff, #c8dcff); color: #003399; }
.b-res { background: #000; color: #39ff14; }
.b-notepad { background: linear-gradient(180deg, #ffffe0, #e6e0a0); color: #333; }
.b-msn { background: linear-gradient(180deg, #8fd16a, #3c8f2a); color: #fff; }

/* ---------- merchant peek ---------- */
.merchant {
  position: fixed; right: 0; top: 46%; z-index: 60; display: flex; align-items: center; gap: 6px;
  flex-direction: row-reverse; overflow: hidden; pointer-events: none; padding: 12px 0 12px 12px;
}
.merchant > * { transform: translateX(64px); transition: transform 0.4s; }
.merchant-body { width: 96px; height: 96px; display: block; pointer-events: auto; cursor: pointer; }
.merchant:hover > *, .merchant:focus-visible > *, .merchant.open > * { transform: none; }
.merchant:focus-visible { outline: none; }
.merchant-say {
  font-family: var(--f-trajan); font-weight: 700; font-size: 13px; line-height: 1.35;
  background: rgba(10, 6, 4, 0.92); color: #e8d9a8; border: 1px solid #8a6a2a; box-shadow: inset 0 0 0 1px #2a1d0a;
  padding: 8px 10px; max-width: 170px; opacity: 0; transition: opacity 0.3s;
}
.merchant:hover .merchant-say, .merchant.open .merchant-say, .merchant:focus-visible .merchant-say { opacity: 1; }

/* ---------- Windows XP (Luna) popups ---------- */
.popup {
  position: fixed; z-index: 8000; width: min(340px, calc(100vw - 24px));
  background: var(--xp-face); color: #000; font-family: var(--f-xp); font-size: 13px;
  border: 3px solid #0831d9; border-top: 0; border-radius: 8px 8px 0 0;
  box-shadow: inset 0 0 0 1px #166aee, 4px 6px 18px rgba(0, 0, 0, 0.55);
  animation: popIn 0.22s cubic-bezier(0.2, 1.5, 0.4, 1);
}
@keyframes popIn { from { transform: scale(0.6); opacity: 0; } }
.popup-bar, .xp-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  height: 30px; margin: 0 -3px; padding: 0 5px 0 8px; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0066ff 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  border: 1px solid #0831d9; border-bottom: 0;
  color: #fff; font: 700 13px var(--trebuchet); text-shadow: 1px 1px 0 #0f1089;
}
.popup-bar span, .xp-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popup-x, .xp-x {
  position: relative; flex: none; width: 22px; height: 22px; padding: 0; cursor: pointer;
  border: 1px solid #fff; border-radius: 3px;
  background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%);
  box-shadow: inset 0 -1px 2px 1px #da4600; transition: transform 0.2s;
}
.popup-x::before, .popup-x::after, .xp-x::before, .xp-x::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2.5px; background: #fff; border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.popup-x::after, .xp-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.popup-x:hover, .xp-x:hover { filter: brightness(1.15); }
.popup-body { display: flex; gap: 12px; align-items: center; padding: 16px 14px 14px; line-height: 1.4; }
.popup-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; font-size: 30px; line-height: 1; }
.popup-icon svg { width: 36px; height: 36px; }
.popup-btns { display: flex; gap: 8px; justify-content: center; padding: 0 14px 14px; }

/* ---------- MSN Messenger toasts ---------- */
.msn-stack { position: fixed; right: 12px; bottom: 12px; z-index: 8500; display: grid; gap: 8px; pointer-events: none; }
.msn {
  width: 232px; pointer-events: auto; font-family: var(--f-xp); color: #000; overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 55%, #cfe0ff 100%);
  border: 1px solid #5a7edc; border-radius: 6px 6px 3px 3px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  animation: msnIn 0.45s cubic-bezier(0.2, 1, 0.3, 1);
  transition: transform 0.45s, opacity 0.45s;
}
.msn.out { transform: translateY(130%); opacity: 0; }
@keyframes msnIn { from { transform: translateY(130%); } }
.msn-head {
  display: flex; align-items: center; gap: 5px; height: 20px; padding: 0 4px 0 6px;
  background: linear-gradient(180deg, #9cc0ff, #4f80e0 60%, #3d6fd6); color: #fff; font-size: 11px; font-weight: 700;
  text-shadow: 0 1px 0 #1d3f8a;
}
.msn-head .msn-x { margin-left: auto; width: 14px; height: 14px; padding: 0; border: 1px solid #fff; border-radius: 2px; background: #d9534f; color: #fff; font-size: 9px; line-height: 1; cursor: pointer; }
.msn-buddy {
  width: 14px; height: 12px; position: relative; flex: none;
}
.msn-buddy::before, .msn-buddy::after {
  content: ''; position: absolute; bottom: 0; width: 8px; height: 11px; border-radius: 50% 50% 2px 2px;
}
.msn-buddy::before { left: 0; background: radial-gradient(circle at 50% 28%, #8fe36a 0 28%, transparent 30%), radial-gradient(ellipse at 50% 100%, #3cae2a 0 55%, transparent 57%); }
.msn-buddy::after { left: 6px; background: radial-gradient(circle at 50% 28%, #6ab4ff 0 28%, transparent 30%), radial-gradient(ellipse at 50% 100%, #2a7ad8 0 55%, transparent 57%); }
.msn-body { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; }
.msn-pic {
  flex: none; width: 52px; height: 52px; padding: 3px; border-radius: 6px;
  background: linear-gradient(180deg, #c4f59a, #47b52a); box-shadow: inset 0 0 0 1px #2e7d1a;
}
.msn-pic.busy { background: linear-gradient(180deg, #ffb0a8, #d8382a); box-shadow: inset 0 0 0 1px #8a1a10; }
.msn-pic img, .msn-pic canvas { display: block; width: 46px; height: 46px; border-radius: 4px; object-fit: cover; background: #fff; }
.msn-text { font-size: 12px; line-height: 1.35; }
.msn-text b { display: block; font-size: 13px; color: #003399; }
.msn-text small { display: block; margin-top: 3px; color: #5a6a9a; font-size: 10px; }
.nudge { animation: nudge 0.6s linear; }
@keyframes nudge {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-9px, 4px); } 20% { transform: translate(8px, -6px); } 30% { transform: translate(-7px, -3px); }
  40% { transform: translate(9px, 5px); } 50% { transform: translate(-6px, 6px); } 60% { transform: translate(7px, -4px); }
  70% { transform: translate(-5px, -5px); } 80% { transform: translate(5px, 3px); } 90% { transform: translate(-3px, 2px); }
}

/* achievement toasts live top-right on desktop here, so MSN owns the bottom-right corner */
@media (min-width: 641px) {
  .ach-toasts { top: 12px; bottom: auto; }
}

/* ---------- video dialog (WMP window) ---------- */
.video-dialog { padding: 0; background: var(--xp-face); border: 3px solid #0831d9; border-top: 0; border-radius: 8px 8px 0 0; max-width: min(900px, calc(100vw - 24px)); color: #000; }
.video-dialog::backdrop { background: rgba(0, 0, 20, 0.85); }
.video-body { padding: 10px; display: grid; gap: 10px; justify-items: end; }
.video-dialog video { width: 100%; max-height: 72vh; display: block; background: #000; border: 2px inset #fff; }
#video-missing { justify-self: stretch; margin: 0; padding: 20px; font-family: var(--f-xp); text-align: center; }

.shake { animation: pageShake 0.3s; }
@keyframes pageShake {
  25% { transform: translate(-5px, 3px) rotate(-1deg); }
  50% { transform: translate(4px, -3px) rotate(1deg); }
  75% { transform: translate(-3px, -2px); }
}

/* ================= v3: Final Fantasy XII · Silent Hill 2 · Psycho Mantis ================= */
:root {
  --ff-gold: #d8c27a;
  --ff-cyan: #8ff4ff;
  --ff-ink: #eef0f8;
}
.ff-window {
  position: relative; color: var(--ff-ink); font-family: var(--trebuchet);
  background: linear-gradient(180deg, rgba(52, 66, 104, 0.96), rgba(16, 22, 42, 0.97) 70%);
  border: 1px solid #c8cee0; border-radius: 4px;
  box-shadow: inset 0 0 0 1px #0a0e1c, inset 0 0 0 2px rgba(200, 206, 224, 0.25), 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* --- License Board */
.licencias { background: #06070f; }
.lic-board {
  margin: 12px; padding: 10px 10px 12px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(80, 140, 200, 0.22), transparent 65%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #1b2236, #0a0d18);
}
.lic-head {
  display: flex; align-items: baseline; gap: 12px; padding: 0 2px 8px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(216, 194, 122, 0.5); font-family: var(--f-lol); letter-spacing: 0.06em;
}
.lic-who { font-size: 18px; color: #fff; }
.lic-lpbox { margin-left: auto; font-size: 14px; color: var(--ff-gold); }
.lic-lp { font-family: var(--f-trajan); font-size: 20px; color: var(--ff-cyan); text-shadow: 0 0 8px rgba(110, 240, 255, 0.7); }
.lic-count { font-size: 13px; color: #9aa4c4; }
.lic-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; max-width: 420px; margin: 0 auto; }
.lic-gap { aspect-ratio: 1; }
.lic-tile {
  position: relative; aspect-ratio: 1; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(145deg, #3a4258, #1a2030 60%, #12161f);
  border: 2px solid; border-color: #b39250 #6a5226 #4a3818 #a8884a; border-radius: 2px;
  box-shadow: inset 0 0 0 1px #05070c, 0 1px 0 rgba(0, 0, 0, 0.6);
  transition: transform 0.12s, box-shadow 0.2s;
}
.lic-tile canvas { width: 62%; height: 62%; display: block; }
.lic-tile:hover { transform: translateY(-1px); }
.lic-tile:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lic-tile.hidden { background: linear-gradient(145deg, #232836, #0e1119); border-color: #5a4a2a #33280f #241c0a #50421f; }
.lic-tile.hidden canvas { visibility: hidden; }
.lic-tile.hidden::after {
  content: '?'; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-trajan); font-weight: 700; font-size: clamp(14px, 4vw, 20px); color: #4c566e;
}
.lic-tile.seen canvas { filter: grayscale(1) brightness(0.7); opacity: 0.55; }
.lic-tile.on {
  background: radial-gradient(circle at 50% 45%, rgba(140, 250, 255, 0.55), rgba(40, 140, 180, 0.35) 45%, #142438 80%);
  border-color: #f2dc90 #a8883e #7a6020 #e6cc78;
  box-shadow: inset 0 0 0 1px #05070c, 0 0 10px rgba(110, 240, 255, 0.55);
}
.lic-tile.on canvas { filter: drop-shadow(0 0 3px rgba(180, 255, 255, 0.9)); }
.lic-tile.sel { outline: 2px solid #fff; outline-offset: 1px; animation: licSel 0.9s steps(2) infinite; }
@keyframes licSel { 50% { outline-color: var(--ff-gold); } }
.lic-tile.just { animation: licGet 1.2s ease-out; }
@keyframes licGet {
  0% { box-shadow: 0 0 0 0 rgba(140, 250, 255, 1), 0 0 30px 10px rgba(140, 250, 255, 0.9); transform: scale(1.25); }
  100% { box-shadow: inset 0 0 0 1px #05070c, 0 0 10px rgba(110, 240, 255, 0.55); transform: none; }
}
.lic-panel {
  margin: 12px auto 0; max-width: 420px; min-height: 84px; padding: 9px 12px 10px;
  background: linear-gradient(180deg, rgba(40, 52, 86, 0.95), rgba(12, 16, 32, 0.95));
  border: 1px solid #c8cee0; border-radius: 4px; box-shadow: inset 0 0 0 1px #0a0e1c;
  font-size: 14px; line-height: 1.35;
}
.lic-panel.empty { display: grid; place-items: center; color: #9aa4c4; font-style: italic; }
.lic-p-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 1px solid rgba(200, 206, 224, 0.25); padding-bottom: 4px; }
.lic-p-head b { font-family: var(--f-lol); font-weight: 400; font-size: 17px; color: #fff; letter-spacing: 0.03em; }
.lic-p-head span { font-family: var(--f-lol); font-size: 13px; color: var(--ff-gold); white-space: nowrap; }
.lic-p-desc { margin: 6px 0 4px; color: #dfe3f2; }
.lic-p-foot { margin: 0; font-size: 12px; color: #8a94b4; }
.lic-p-foot.on { color: var(--ff-cyan); }

/* --- Clan Centurio hunt board */
.cacerias { background: #1a0f08; }
.mog { display: flex; align-items: center; gap: 10px; padding: 12px 12px 0; }
.mog-pic { width: 64px; height: 64px; flex: none; animation: mogBob 2.4s ease-in-out infinite; }
@keyframes mogBob { 50% { transform: translateY(-4px); } }
.mog-say { margin: 0; padding: 8px 12px; font-size: 14px; line-height: 1.35; }
.mog-say b { display: block; font-family: var(--f-lol); font-weight: 400; font-size: 13px; color: var(--ff-gold); letter-spacing: 0.06em; }
.hunt-board {
  --ink: #2e1a0b;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px;
  margin: 12px; padding: 26px 16px 24px; border: 10px solid #24140a; border-radius: 4px;
  box-shadow: 0 0 0 1px #0a0502, inset 0 0 0 1px rgba(255, 214, 160, 0.1), inset 0 0 48px rgba(0, 0, 0, 0.8), 0 6px 16px rgba(0, 0, 0, 0.6);
  background:
    radial-gradient(circle at 17% 4%, rgba(8, 3, 0, 0.8) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 61% 51%, rgba(8, 3, 0, 0.8) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 39% 97%, rgba(8, 3, 0, 0.8) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 91% 31%, rgba(8, 3, 0, 0.7) 0 1.4px, transparent 2.4px),
    radial-gradient(ellipse 9px 22px at 71% 18%, rgba(24, 10, 2, 0.8), rgba(60, 30, 10, 0.45) 50%, transparent 75%),
    radial-gradient(ellipse 7px 16px at 13% 66%, rgba(24, 10, 2, 0.75), rgba(60, 30, 10, 0.4) 50%, transparent 75%),
    radial-gradient(ellipse at 28% 88%, rgba(10, 4, 0, 0.4), transparent 38%),
    radial-gradient(ellipse at 84% 8%, rgba(10, 4, 0, 0.3), transparent 30%),
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 3px), rgba(8, 3, 0, 0.85) calc(25% - 3px) calc(25% - 1px), rgba(255, 210, 150, 0.08) calc(25% - 1px) 25%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='400'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.28 0.008' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.04 0 0 0 0 0.01 1.6 0 0 0 -0.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E"),
    linear-gradient(90deg, #6c4423 0 25%, #5c381b 25% 50%, #704828 50% 75%, #583419 75%);
}
.hunt-bill {
  position: relative; isolation: isolate; padding: 26px 13px 20px; color: var(--ink); font-family: var(--f-hp);
  filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.5)) drop-shadow(3px 7px 7px rgba(0, 0, 0, 0.4));
  transform: rotate(-1.4deg);
}
.hunt-bill::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 84% 12%, transparent 0 15px, rgba(120, 66, 18, 0.13) 16px 17.5px, rgba(120, 66, 18, 0.05) 18.5px, transparent 20px),
    radial-gradient(circle at 23% 71%, rgba(130, 74, 24, 0.4) 0 1.2px, transparent 2.6px),
    radial-gradient(circle at 28% 74%, rgba(130, 74, 24, 0.3) 0 0.8px, transparent 2px),
    radial-gradient(circle at 74% 58%, rgba(130, 74, 24, 0.35) 0 1px, transparent 2.4px),
    radial-gradient(circle at 12% 30%, rgba(130, 74, 24, 0.3) 0 1.6px, transparent 3.4px),
    radial-gradient(circle at 88% 82%, rgba(130, 74, 24, 0.32) 0 1.2px, transparent 2.8px),
    radial-gradient(ellipse at 8% 94%, rgba(140, 82, 24, 0.32), transparent 24%),
    radial-gradient(ellipse at 96% 46%, rgba(140, 82, 24, 0.18), transparent 18%),
    radial-gradient(ellipse at 50% 46%, transparent 52%, rgba(110, 62, 16, 0.38) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0 0.12 1.2 0 0 0 -0.52'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    linear-gradient(172deg, #f4e7c4, #e9d6a6 55%, #dcc48c);
  clip-path: polygon(0% 1%, 8% 1.3%, 16.7% 1.2%, 25.4% 0%, 32.3% 1.5%, 39.9% 1.4%, 45.3% 0.8%, 51.3% 0.9%, 58.6% 0%, 64.5% 0.4%, 73.2% 1.2%, 78.8% 1.3%, 84.3% 1%, 89.9% 0%, 98.3% 0.3%, 98.6% 2%, 99.6% 10.5%, 99.2% 19.3%, 99.7% 27%, 99% 35.8%, 98.7% 44.7%, 99.5% 50.9%, 99.8% 56.5%, 99.6% 61.8%, 100% 69.2%, 99.5% 76.9%, 98.9% 83.2%, 99.6% 90.1%, 99% 97%, 100% 98.4%, 94.9% 98.8%, 86.5% 100%, 78.4% 99.4%, 71.1% 100%, 65.9% 99.7%, 57.1% 99.7%, 49% 98.5%, 40.3% 99.4%, 33.8% 96.8%, 25.7% 99.8%, 17.8% 98.7%, 9.3% 99.9%, 0.5% 99.9%, 0.9% 98%, 0.5% 89.3%, 0.8% 80.6%, 0.4% 74.4%, 0.1% 68.7%, 1% 63.1%, 0.2% 54.1%, 1.4% 48.9%, 0.6% 41.8%, 0.8% 35.8%, 0.6% 27.5%, 0.1% 20.8%, 0% 12.2%, 1.2% 5.2%);
}
/* printed border, a bit faded */
.hunt-bill::after { content: ''; position: absolute; inset: 9px 8px; border: 3px double rgba(46, 26, 11, 0.5); pointer-events: none; z-index: -1; }
.hunt-bill:nth-child(even) { transform: rotate(1.2deg); }
.hunt-bill:nth-child(even)::before { transform: scale(-1, -1); }
.hunt-pin {
  position: absolute; top: 6px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 36% 32%, #fff6cc 0 1.4px, #dcb552 3px, #9c7222 5.5px, #4a3206 7px);
  box-shadow: 2px 3px 2px rgba(0, 0, 0, 0.55);
}
/* the paper puckers around the tack */
.hunt-pin::before, .hunt-pin::after {
  content: ''; position: absolute; top: 9px; left: 6px; width: 1px; height: 18px; z-index: -1;
  background: linear-gradient(rgba(90, 54, 18, 0.4), transparent); transform-origin: top; transform: rotate(28deg);
}
.hunt-pin::after { transform: rotate(-34deg); height: 14px; }
.hunt-kicker { display: flex; align-items: center; gap: 8px; padding-left: 0.32em; font-family: var(--f-hp-sc); font-size: 12px; letter-spacing: 0.32em; color: #6a3c14; }
.hunt-kicker::before, .hunt-kicker::after { content: ''; flex: 1; border-top: 3px double rgba(46, 26, 11, 0.45); }
.hunt-name { margin: 3px 0 6px; font-family: var(--f-trajan); font-weight: 700; font-size: 15px; line-height: 1.15; text-align: center; color: #241205; min-height: 2.3em; display: grid; place-items: center; text-shadow: 0 0 0.6px rgba(36, 18, 5, 0.7); }
.hunt-pic { width: min(100%, 180px); margin: 0 auto; aspect-ratio: 1; }
.hunt-pic canvas { display: block; width: 100%; height: 100%; mix-blend-mode: multiply; opacity: 0.94; }
.hunt-meta { display: grid; grid-template-columns: auto 1fr; gap: 1px 6px; margin: 8px 0 4px; padding-top: 6px; border-top: 1px solid rgba(46, 26, 11, 0.3); font-size: 13px; line-height: 1.25; }
.hunt-meta dt { font-family: var(--f-hp-sc); color: #6a3c14; }
.hunt-meta dd { margin: 0; font-family: Georgia, serif; font-weight: 700; font-size: 0.92em; color: #241205; overflow-wrap: anywhere; }
.hunt-bill.rank-s .hunt-meta dd:first-of-type { color: #a80e16; }
.hunt-quote { margin: 4px 0 0; padding-right: 26px; font-style: italic; font-size: 13px; line-height: 1.3; }
.hunt-seal { position: absolute; right: -4px; bottom: -8px; width: 46px; height: 46px; transform: rotate(-14deg); z-index: 2; }
.hunt-bill:nth-child(even) .hunt-seal { transform: rotate(9deg); }
/* rank S: red-ink border and kicker, gold-leaf seal with ribbons, sash across the corner */
.hunt-bill.rank-s::after { border-color: rgba(150, 14, 20, 0.6); }
.hunt-bill.rank-s .hunt-kicker { color: #a80e16; }
.hunt-bill.rank-s .hunt-kicker::before, .hunt-bill.rank-s .hunt-kicker::after { border-color: rgba(150, 14, 20, 0.5); }
.hunt-bill.rank-s { grid-column: 1 / -1; justify-self: center; width: calc(50% - 9px); }
.hunt-bill.rank-s .hunt-seal { width: 60px; height: 60px; right: -8px; bottom: -16px; }
.hunt-sash {
  position: absolute; top: 15px; right: -24px; width: 104px; padding: 3px 0 2px; z-index: 2;
  font-family: var(--f-trajan); font-weight: 700; font-size: 10px; letter-spacing: 0.16em; text-align: center; color: #f7e3a6;
  background: linear-gradient(180deg, #c4232a, #8c1016); border-block: 1px solid rgba(240, 196, 100, 0.75);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.45); transform: rotate(38deg);
}
.hunt-stamp {
  position: absolute; left: 50%; top: 56%; padding: 3px 12px 1px; z-index: 3;
  font-family: var(--f-trajan); font-weight: 900; font-size: 30px; letter-spacing: 0.08em; color: rgba(186, 14, 20, 0.9);
  border: 5px double rgba(186, 14, 20, 0.9); border-radius: 5px;
  transform: translate(-50%, -50%) rotate(-16deg); pointer-events: none; background: rgba(240, 226, 186, 0.55);
  box-shadow: 0 0 0 2px rgba(240, 226, 186, 0.3);
  mix-blend-mode: multiply;
  -webkit-mask-image: repeating-radial-gradient(circle at 30% 40%, #000 0 3px, rgba(0, 0, 0, 0.55) 3px 4px, #000 4px 7px);
  mask-image: repeating-radial-gradient(circle at 30% 40%, #000 0 3px, rgba(0, 0, 0, 0.55) 3px 4px, #000 4px 7px);
  animation: stamp 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
/* the rank S bill: stamp lands on the text, the portrait stays visible */
.hunt-bill.rank-s .hunt-stamp { top: 79%; }
@keyframes stamp { from { transform: translate(-50%, -50%) rotate(-16deg) scale(2.4); opacity: 0; } }
/* Montblanc is a button: poke him */
.mog-btn { flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.mog-btn:focus-visible { outline: 2px solid var(--ff-gold); outline-offset: 2px; }
.mog-btn.poke { animation: mogPoke 0.32s ease-out; }
@keyframes mogPoke { 30% { transform: scale(1.14, 0.84); } 65% { transform: scale(0.94, 1.08); } }
@media (prefers-reduced-motion: reduce) {
  .mog-btn.poke { animation: none; }
}

/* --- Gambits */
.gambits { background: #06070f; }
.gambit-win { margin: 12px; padding: 8px 8px 10px; overflow: hidden; }
.gambit-head { display: flex; justify-content: space-between; padding: 0 4px 6px; font-family: var(--f-lol); font-size: 14px; letter-spacing: 0.06em; color: var(--ff-gold); border-bottom: 1px solid rgba(216, 194, 122, 0.45); }
.gambit-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.gambit {
  display: grid; grid-template-columns: 44px 18px minmax(0, 1fr) 12px minmax(0, 1fr); align-items: center; gap: 6px;
  padding: 4px 6px; font-size: 14px; line-height: 1.2; color: #7a829c;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(200, 206, 224, 0.15); border-radius: 3px;
}
.gambit.on { color: var(--ff-ink); background: linear-gradient(90deg, rgba(80, 130, 220, 0.38), rgba(40, 60, 120, 0.15)); border-color: rgba(160, 190, 255, 0.35); }
.gambit-tog {
  font-family: var(--f-lol); font-size: 12px; letter-spacing: 0.05em; padding: 3px 0; cursor: pointer;
  color: #8a8f9e; background: #1a1d28; border: 1px solid #5a6074; border-radius: 3px;
}
.gambit.on .gambit-tog { color: #0a1a24; background: linear-gradient(180deg, #c8fbff, #5ad8f0); border-color: #e8ffff; box-shadow: 0 0 6px rgba(110, 240, 255, 0.6); }
.gambit-tog:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.gambit-n { font-family: var(--f-trajan); font-weight: 700; color: var(--ff-gold); text-align: center; }
.gambit-arrow { color: var(--ff-gold); font-size: 11px; }
.gambit-action { font-weight: 700; }
.gambit.rebel { animation: rebel 0.5s; }
@keyframes rebel { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
/* sits over the header strip, like FFXII's help line, so it never hides a gambit row */
.gambit-toast {
  position: absolute; left: 6px; right: 6px; top: 4px; margin: 0; padding: 5px 14px;
  font-size: 14px; line-height: 1.2; text-align: center; color: #fff;
  background: linear-gradient(180deg, rgba(52, 66, 104, 0.98), rgba(16, 22, 42, 0.98)); border: 1px solid #c8cee0; border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  transform: translateY(-6px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.gambit-toast.show { opacity: 1; transform: none; }

/* --- SH2 pocket radio on the onions stat */
.stat-click { position: relative; }
.pocket-radio {
  position: absolute; top: 6px; right: 6px; width: 16px; height: 22px; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, #4a4a44, #22221e); border: 1px solid #0c0c0a; border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.pocket-radio::before { content: ''; position: absolute; left: 2px; top: -9px; width: 1.5px; height: 10px; background: #888; transform: rotate(-12deg); }
.pocket-radio::after { content: ''; position: absolute; left: 3px; right: 3px; bottom: 3px; height: 9px; background: radial-gradient(circle, #111 0.9px, transparent 1.2px) 0 0 / 3px 3px; }
.pocket-radio i { position: absolute; top: 3px; right: 3px; width: 3px; height: 3px; border-radius: 50%; background: #ff3a2a; box-shadow: 0 0 4px #ff3a2a; }
.radio-on .pocket-radio { animation: radioFlicker 0.18s steps(2) infinite; }
@keyframes radioFlicker { 0% { opacity: 1; } 50% { opacity: 0.35; } }

/* --- Mary's letter */
.carta { background: #0d0d0c; border-color: #6a6a64 #2a2a26 #1a1a18 #5a5a54; overflow: hidden; }
.carta-scene {
  position: relative; padding: 34px 18px 38px;
  background: radial-gradient(ellipse at 50% 50%, #3a3a36, #121210 75%);
}
.carta-paper {
  position: relative; max-width: 480px; margin: 0 auto; padding: 26px 26px 20px;
  font-family: var(--f-isaac-body); font-size: 21px; line-height: 1.45; color: #2a2620;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(160, 130, 80, 0.18), transparent 40%),
    radial-gradient(ellipse at 90% 95%, rgba(140, 110, 70, 0.22), transparent 45%),
    linear-gradient(180deg, #f2e9d0, #e6dab8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transform: rotate(-0.8deg);
}
.carta-paper p { margin: 0 0 10px; }
.carta-sign { text-align: right; font-size: 23px; }
.carta-fog { position: absolute; inset: 0; pointer-events: none; }
.carta-fog i {
  position: absolute; inset: -30%; transition: opacity 3.2s ease-in-out;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(200, 200, 194, 0.95), transparent 45%),
    radial-gradient(ellipse at 70% 60%, rgba(210, 210, 204, 0.9), transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(190, 190, 184, 0.85), rgba(170, 170, 164, 0.7) 70%);
  animation: fogDrift 18s ease-in-out infinite alternate;
}
.carta-fog i + i {
  background:
    radial-gradient(ellipse at 60% 30%, rgba(220, 220, 214, 0.8), transparent 40%),
    radial-gradient(ellipse at 20% 80%, rgba(200, 200, 194, 0.75), transparent 45%);
  animation-duration: 24s; animation-direction: alternate-reverse;
  -webkit-mask-image: radial-gradient(ellipse 38% 38% at 50% 50%, transparent 72%, #000 100%);
  mask-image: radial-gradient(ellipse 38% 38% at 50% 50%, transparent 72%, #000 100%);
}
/* the fog clears off the letter; a thin bank keeps drifting along the edges */
.carta.in .carta-fog i:first-child { opacity: 0; }
.carta.in .carta-fog i + i { opacity: 0.45; }
@keyframes fogDrift { from { transform: translate(-6%, 2%) scale(1); } to { transform: translate(6%, -3%) scale(1.12); } }

/* --- Psycho Mantis */
.mantis-mask { display: block; margin: 10px auto 0; padding: 0; width: 28px; height: 28px; background: none; border: 0; cursor: pointer; opacity: 0.22; transition: opacity 0.3s; }
.mantis-mask:hover, .mantis-mask:focus-visible { opacity: 0.9; }
.mantis-mask canvas { width: 28px; height: 28px; display: block; }
.mantis {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: #000; animation: crtOn 0.5s ease-out, crtFlicker 0.12s steps(2) infinite;
}
.mantis.out { animation: crtOff 0.45s ease-in forwards; }
@keyframes crtOn { 0% { transform: scaleY(0.01); filter: brightness(4); } 60% { transform: scaleY(1); } }
@keyframes crtOff { to { transform: scale(1.2, 0.01); opacity: 0; filter: brightness(4); } }
@keyframes crtFlicker { 50% { filter: brightness(0.82); } }
.mantis-static {
  position: absolute; inset: 0; opacity: 0.55; background: var(--noise) 0 0 / 256px 256px;
  animation: staticMove 0.25s steps(4) infinite;
}
.mantis.talk .mantis-static { opacity: 0.08; transition: opacity 0.8s; }
.mantis::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0 2px, transparent 2px 4px); }
@keyframes staticMove { 25% { background-position: 37px -61px; } 50% { background-position: -83px 29px; } 75% { background-position: 51px 97px; } }
.mantis-corner {
  position: absolute; top: max(18px, env(safe-area-inset-top)); right: 24px;
  font-family: var(--f-retro); font-size: clamp(34px, 7vw, 56px); letter-spacing: 0.1em; color: #ff2a1a;
  text-shadow: 0 0 10px rgba(255, 40, 20, 0.85);
}
.mantis-fig {
  position: absolute; width: min(60vw, 340px); height: auto; aspect-ratio: 1; opacity: 0;
  filter: drop-shadow(0 0 30px rgba(255, 30, 30, 0.6));
}
.mantis.talk .mantis-fig { opacity: 0.32; transition: opacity 1.4s; animation: mantisFloat 4s ease-in-out infinite; }
@keyframes mantisFloat { 50% { transform: translateY(-14px) rotate(2deg); } }
.mantis-line {
  position: relative; max-width: min(900px, calc(100vw - 32px)); margin: 0; padding: 0 16px; text-align: center;
  font-family: var(--f-typewriter); font-size: clamp(24px, 5vw, 48px); line-height: 1.25; color: #ff2a1a; text-wrap: balance;
  text-shadow: 0 0 14px rgba(255, 30, 20, 0.9), 2px 0 0 rgba(0, 180, 255, 0.35), -2px 0 0 rgba(255, 0, 80, 0.4);
}
.mantis-line.in { animation: mantisIn 0.7s ease-out; }
@keyframes mantisIn { from { opacity: 0; filter: blur(10px); letter-spacing: 0.3em; } }
.mantis-hint { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0; text-align: center; font-family: var(--f-retro); font-size: 18px; color: #6a6a6a; }
.mantis-shake { animation: mantisShake 0.22s linear infinite; }
@keyframes mantisShake {
  25% { transform: translate(-7px, 4px) rotate(-0.8deg); } 50% { transform: translate(6px, -5px) rotate(0.7deg); }
  75% { transform: translate(-4px, -3px) rotate(-0.4deg); }
}
.winamp.possessed .wa-lcd { animation: waGlitch 0.16s steps(2) infinite; }
@keyframes waGlitch { 50% { filter: hue-rotate(120deg) invert(1); transform: translateX(3px); } }

/* wide screens: sidebars ride along while you scroll (chaos.js sets their top) */
@media (min-width: 1101px) {
  .side-left, .side-right { position: sticky; top: 12px; }
  .runner-panel { position: static; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .site { max-width: 848px; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'main' 'right' 'left'; }
  .side-left, .side-right { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
  .winamp, .runner-panel { align-self: start; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .site { padding: 8px 8px 0; }
  .banner { padding: 12px 8px 10px; column-gap: 8px; margin-bottom: 10px; }
  .wordart { font-size: clamp(30px, 10vw, 48px); }
  .chrome25 span { font-size: clamp(46px, 15vw, 72px); }
  .tagline { margin-top: 8px; font-size: 11px; }
  .layout { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .side, .col-main { display: contents; }
  .hero { order: 1; }
  .winamp { order: 2; align-self: stretch; }
  .stats-box { order: 3; }
  .facts { order: 4; }
  .licencias { order: 5; }
  .cacerias { order: 6; }
  .gambits { order: 7; }
  .carta { order: 10; }
  .gallery-section { order: 12; }
  .guestbook { order: 13; }
  .box-poll { order: 14; }
  .box-counter { order: 16; }
  .box-profile { order: 15; }
  .box-blinkies { order: 17; }
  .box-construction { order: 18; }
  .box-nav { order: 19; }
  .lic-board, .gambit-win { margin: 8px; padding: 8px; }
  .lic-grid { gap: 4px; }
  .hunt-board { margin: 8px; padding: 18px 8px 16px; border-width: 7px; gap: 18px 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hunt-bill.rank-s { width: calc(50% - 4px); }
  .hunt-bill { padding: 22px 9px 14px; }
  .hunt-bill::after { inset: 6px 5px; }
  .hunt-kicker { font-size: 11px; gap: 5px; letter-spacing: 0.24em; padding-left: 0.24em; }
  .hunt-name { font-size: 13px; }
  .hunt-meta, .hunt-quote { font-size: 12px; }
  .hunt-meta { grid-template-columns: 1fr; }
  .hunt-meta dd { margin-bottom: 2px; }
  .hunt-quote { padding-right: 14px; }
  .hunt-seal { width: 36px; height: 36px; bottom: -6px; }
  .hunt-bill.rank-s .hunt-seal { width: 46px; height: 46px; bottom: -12px; right: -6px; }
  .hunt-sash { top: 9px; right: -16px; width: 78px; font-size: 8px; padding: 2px 0 1px; }
  .hunt-bill.rank-s .hunt-quote { padding-right: 28px; }
  .hunt-stamp { top: 38%; font-size: 21px; border-width: 4px; padding: 2px 8px 0; }
  .hunt-bill.rank-s .hunt-stamp { top: 80%; }
  .gambit { grid-template-columns: 40px 14px minmax(0, 1fr); gap: 2px 6px; font-size: 13px; }
  .gambit-arrow { display: none; }
  .gambit-action { grid-column: 3; }
  .gambit-tog { grid-row: span 2; }
  .gambit-n { grid-row: span 2; }
  .carta-scene { padding: 24px 10px 28px; }
  .carta-paper { padding: 18px 16px 14px; font-size: 19px; }
  .hero-body { padding: 6px 10px 12px; }
  .wawita { font-size: 22px; }
  .broc-wrap { width: min(210px, 54vw); }
  .cta-row { margin: 8px 0 6px; }
  .hero .cta { font-size: 21px; padding: 10px 30px 10px 10px; }
  .cta-flag { width: 34px; height: 34px; font-size: 20px; }
  .stats { gap: 8px; padding: 8px; }
  .lcd { font-size: 26px; min-width: 0; width: 100%; padding: 2px 4px 0; }
  .stat-label { font-size: 11px; }
  .facts-body { flex-direction: column; align-items: stretch; text-align: center; gap: 8px; }
  .breaking { align-self: center; }
  .gb-inner { padding: 10px; }
  .gb-row { grid-template-columns: 1fr; gap: 4px; }
  .gb-lab { padding-top: 6px; float: none; }
  .gb-actions { padding-left: 0; }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; padding: 22px 12px 30px; }
  .wall .polaroid, .wall .postit { width: 100%; max-width: 170px; }
  .wall-note { padding: 16px 10px 10px; min-height: 130px; }
  .wall-msg { font-size: 16px; }
  .wall-pic { width: 120px; margin-right: -8px; }
  .runner-panel { position: fixed; left: 8px; bottom: 8px; top: auto; z-index: 50; width: 70px; transform: translateX(-130%); transition: transform 0.5s cubic-bezier(0.2, 1.2, 0.4, 1); }
  body.runner-on .runner-panel { transform: none; }
  body.typing .runner-panel { transform: translateX(-130%); }
  .phone { padding: 6px 4px; border-radius: 14px; }
  .phone-notch { width: 22px; height: 3px; top: 2px; }
  #runner { border-radius: 9px; }
  .merchant-body { width: 72px; height: 72px; }
  .merchant > * { transform: translateX(46px); }
  .msn-stack { right: 8px; bottom: 8px; }
  .msn { width: 196px; }
  .msn-body { gap: 8px; padding: 6px 8px 8px; }
  .msn-pic { width: 38px; height: 38px; padding: 2px; }
  .msn-pic img, .msn-pic canvas { width: 34px; height: 34px; }
  .msn-text { font-size: 11px; }
  .msn-text b { font-size: 12px; }
  .box-title { font-size: min(12px, 3.05vw); letter-spacing: 0; padding-inline: 8px; }
  .webring { margin-top: 10px; }
  .footer { padding-bottom: 150px; }
  .badges { display: grid; grid-template-columns: repeat(2, 88px); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .starfield i, .banner-glitter, .chrome25 span, .blink, .spin-star, .sp, .glass-ice, .live,
  .breaking, .blinkie b, .worker .shovel, .tape, .new, .wa-hint, #wa-play, .wa-scroll-track,
  .mog-pic, .carta-fog i, .lic-tile.sel, .mantis, .mantis-static, .mantis.talk .mantis-fig, .radio-on .pocket-radio {
    animation: none !important;
  }
}

/* main-column boxes always span the column (the license board and gambits shrink-to-fit otherwise) */
.col-main > .box { width: 100%; box-sizing: border-box; }
