/* extras.css · later design layers:
   stickers you can drag, a second marquee, hand-drawn underlines, sparkles, sonar pings,
   the "post on x" bubble for selected text, and the whole site as it would have looked in 1998. */

/* ---------- scrollbar ---------- */
html { scrollbar-width: thin; scrollbar-color: var(--violet) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--pink), var(--violet), var(--mint)); border-radius: 99px; border: 3px solid var(--bg); }

/* ---------- a seventh rabbit hole, when it arrives ---------- */
.h7 { grid-column: 3 / span 6; margin-top: 10px; --tilt: 0.6deg; border-radius: 30px 30px 6px 30px; }

/* ---------- hand-drawn underline under the iridescent words ---------- */
.iri { position: relative; }
.scribble {
  position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.32em;
  overflow: visible; pointer-events: none;
}
.scribble path {
  fill: none; stroke: url(#scribble-grad); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: var(--len, 300); stroke-dashoffset: var(--len, 300);
  transition: stroke-dashoffset 2.6s cubic-bezier(.5, .1, .2, 1) 0.2s;
  vector-effect: non-scaling-stroke;
}
.scribble.drawn path { stroke-dashoffset: 0; }

/* ---------- sparkles ---------- */
.spark {
  position: fixed; z-index: 85; pointer-events: none;
  font-size: var(--s, 12px); line-height: 1; color: var(--c, var(--pink));
  animation: spark 0.9s cubic-bezier(.2, .7, .3, 1) forwards;
  text-shadow: 0 0 10px currentColor;
}
@keyframes spark {
  0% { transform: translate(-50%, -50%) scale(0.2) rotate(0deg); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(160deg); opacity: 0; }
}

/* ---------- sonar ping on section numbers ---------- */
.sec-num { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.sec-num::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); flex: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--pink) 60%, transparent);
}
.sec-num.pinged::before { animation: sonar 1.6s ease-out 2; }
@keyframes sonar {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pink) 60%, transparent); }
  100% { box-shadow: 0 0 0 26px color-mix(in srgb, var(--pink) 0%, transparent); }
}
.archive .sec-head .sec-num { justify-self: end; }

/* ---------- the second marquee: outlined, drifting the other way ---------- */
.marquee-2 {
  overflow: hidden; white-space: nowrap; margin: clamp(80px, 10vw, 150px) 0 0;
  font-size: clamp(64px, 12vw, 190px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9;
  font-variation-settings: "wdth" 78, "opsz" 96;
  color: transparent; -webkit-text-stroke: 1.2px var(--line-2);
  transform: rotate(1.5deg);
  user-select: none;
}
.marquee-2 .m2-track { display: inline-flex; will-change: transform; }
.marquee-2 .m2-track span { padding-right: 0.25em; }
.marquee-2 em { font-family: var(--serif); font-style: italic; font-weight: 400; -webkit-text-stroke: 0; color: var(--pink); opacity: 0.8; }
.marquee, .marquee-2 { will-change: transform; }

/* ---------- stickers ---------- */
.sticker {
  position: absolute; z-index: 30; left: 0; top: 0;
  touch-action: none; user-select: none; cursor: grab;
  font-family: var(--mono); font-size: 12px; line-height: 1.1; white-space: nowrap;
  padding: 8px 12px; border-radius: 12px;
  border: 3px solid #fff;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(0, 0, 0, 0.2);
  transform: translate(var(--x, 0px), var(--y, 0px)) rotate(var(--r, 0deg)) scale(var(--sc, 1));
  transition: box-shadow 0.2s, scale 0.2s;
  will-change: transform;
}
.sticker:hover { --sc: 1.06; }
.sticker.dragging { cursor: grabbing; --sc: 1.12; box-shadow: 0 24px 40px -14px rgba(0, 0, 0, 0.7); z-index: 31; transition: none; }
.sticker.spin { animation: sticker-spin 0.7s cubic-bezier(.2, .9, .2, 1.3); }
@keyframes sticker-spin { 50% { scale: 1.2; rotate: 180deg; } 100% { rotate: 360deg; } }
.st-gm { background: #8ef3d1; color: #0b3d2e; border-radius: 99px; font-weight: 700; font-size: 18px; padding: 8px 16px; }
.st-404 { background: #0c0a1a; color: #ff8ccf; font-family: var(--pixel); font-size: 20px; border-radius: 4px; }
.st-cat { background: #fff4dc; color: #402a00; font-size: 14px; border-radius: 16px 16px 16px 2px; }
.st-star { background: conic-gradient(from 20deg, #ff8ccf, #ffd08a, #8ef3d1, #8fd3ff, #a393ff, #ff8ccf); color: #1a1030; font-size: 22px; width: 54px; height: 54px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.st-sign { background: #ffd08a; color: #2a1a00; border-radius: 3px; font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: 0.08em; border-color: #2a1a00; outline: 2px solid #ffd08a; }
.st-trust { background: #a393ff; color: #140f2e; font-family: var(--serif); font-style: italic; font-size: 17px; border-radius: 40% 60% 55% 45% / 55% 45% 55% 45%; padding: 10px 16px; }
.st-hint { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); font-size: 9px; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.sticker:hover .st-hint { opacity: 1; }
@media (max-width: 860px) { .sticker { font-size: 11px; } .st-gm { font-size: 15px; } .st-404 { font-size: 16px; } }

/* ---------- select text, get a little bubble ---------- */
.quote-pop {
  position: fixed; z-index: 96; left: 0; top: 0;
  display: flex; gap: 2px; padding: 4px; border-radius: 99px;
  background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow);
  opacity: 0; transform: translate(var(--qx, 0px), var(--qy, 0px)) scale(0.8); transform-origin: 50% 100%;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s cubic-bezier(.2, .9, .2, 1.4);
}
.quote-pop.on { opacity: 1; pointer-events: auto; transform: translate(var(--qx, 0px), var(--qy, 0px)) scale(1); }
.quote-pop::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
.quote-pop a, .quote-pop button {
  font-family: var(--mono); font-size: 11px; color: inherit; background: none; border: 0; cursor: pointer;
  padding: 6px 11px; border-radius: 99px; text-decoration: none;
}
.quote-pop a:hover, .quote-pop button:hover { background: color-mix(in srgb, var(--bg) 18%, transparent); }

/* ---------- 1998 ---------- */
.y98-btn { margin-top: 18px; }
.y98-bar { display: none; }
.y1998 .y98-bar {
  display: block; position: fixed; left: 0; right: 0; top: 0; z-index: 61; height: 26px; overflow: hidden;
  background: repeating-linear-gradient(-45deg, #ffd800 0 16px, #111 16px 32px);
  border-bottom: 2px solid #111;
}
.y98-bar span {
  display: inline-block; margin-top: 3px; padding: 1px 10px; background: #ffd800; color: #111; font: bold 13px "Times New Roman", serif;
  white-space: nowrap; animation: y98-scroll 18s linear infinite;
}
@keyframes y98-scroll { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }
.y1998 {
  --bg: #008080; --bg-2: #c0c0c0; --bg-3: #dfdfdf; --ink: #000; --ink-2: #111; --muted: #333;
  --line: #808080; --line-2: #404040; --pink: #ff00ff; --violet: #0000ff; --mint: #00a000; --amber: #ff8000; --sky: #0000ff;
  --paper: #ffffe0; --glass: #c0c0c0; --iri: linear-gradient(90deg, red, orange, yellow, lime, cyan, blue, magenta, red);
  --sans: "Times New Roman", Times, serif; --serif: "Times New Roman", Times, serif; --mono: "Courier New", Courier, monospace;
  --shadow: none;
  color-scheme: light;
}
.y1998 body {
  background-color: #008080;
  background-image:
    radial-gradient(circle at 12px 14px, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 44px 40px, #ffff80 0 1px, transparent 1.5px),
    radial-gradient(circle at 30px 6px, #fff 0 0.8px, transparent 1.2px);
  background-size: 56px 56px, 70px 70px, 48px 48px;
  font-family: "Times New Roman", Times, serif; font-variation-settings: normal;
  cursor: default;
}
.y1998 body::before, .y1998 body::after, .y1998 .grain, .y1998 #soap, .y1998 .hero-fallback, .y1998 .ring, .y1998 .gauge { display: none !important; }
.y1998 * { border-radius: 0 !important; text-shadow: none !important; font-variation-settings: normal !important; letter-spacing: normal !important; }
.y1998 .top { top: 26px; background: #c0c0c0; border-bottom: 2px solid #404040; backdrop-filter: none; }
.y1998 .brand { font-family: "Comic Sans MS", "Chalkboard SE", cursive; color: #000080; }
.y1998 .nav a { color: #0000ee; text-decoration: underline; background: none !important; font-family: "Times New Roman", serif; font-size: 15px; }
.y1998 .ctl { background: #c0c0c0; border: 2px outset #fff; }
.y1998 a { color: #0000ee; }
.y1998 a:visited { color: #551a8b; }
.y1998 .wordmark { font-family: "Comic Sans MS", "Chalkboard SE", cursive; color: #ffff00; font-size: clamp(54px, 13vw, 220px); letter-spacing: -0.02em !important; text-shadow: 4px 4px 0 #ff00ff !important; }
.y1998 .l:nth-child(3n) { color: #00ffff; }
.y1998 .wm-star { color: #ff0000; }
.y1998 .bio, .y1998 .hero-meta, .y1998 .field, .y1998 .dive, .y1998 .chip-note, .y1998 .exploring .label { color: #fff; }
.y1998 .bio { font-family: "Arial", sans-serif; font-weight: bold; }
.y1998 .bio-fr { color: #ffff80; }
.y1998 .iri, .y1998 .amp { -webkit-background-clip: text; background-clip: text; color: transparent; font-family: "Comic Sans MS", cursive; font-style: normal; animation: film 2s linear infinite; }
.y1998 .chip { background: #c0c0c0; color: #000; border: 2px outset #fff; transform: none; font-family: "Arial", sans-serif; }
.y1998 .chip[aria-pressed="true"] { border-style: inset; background: #a0a0a0; }
.y1998 .specimen-label { background: #ffffe0; border: 1px solid #000; transform: none; }
.y1998 .marquee { background: #000080; color: #ffff00; transform: none; font-family: "Arial Black", sans-serif; border-color: #000; }
.y1998 .marquee-2 { -webkit-text-stroke: 2px #ffff00; transform: none; }
.y1998 .sec-num { color: #ffff00; }
.y1998 .sec-head h2 { color: #ffff00; font-family: "Arial Black", "Arial", sans-serif; font-weight: 900; }
.y1998 .sec-sub { color: #fff; }
.y1998 .hole, .y1998 .card, .y1998 .toy, .y1998 .win, .y1998 .spec-frame, .y1998 .note, .y1998 .about-text, .y1998 .foot-grid > div, .y1998 .links {
  background: #c0c0c0 !important; color: #000; border: 2px outset #fff !important; transform: none !important; animation: none;
}
.y1998 .note { padding: 12px 14px; text-align: left !important; }
.y1998 .notes-list::before, .y1998 .note::before { display: none; }
.y1998 .hole h3, .y1998 .card h3 { color: #000080; font-family: "Arial", sans-serif; font-weight: bold; }
.y1998 .stayed { border-left-color: #000080; font-family: "Times New Roman", serif; }
.y1998 .win-bar { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; }
.y1998 .win-title { background: none; color: #fff; font-weight: bold; }
.y1998 .tbtn, .y1998 .filter, .y1998 .steps summary { background: #c0c0c0; color: #000; border: 2px outset #fff; font-family: "Arial", sans-serif; }
.y1998 .tbtn.big, .y1998 .filter.on, .y1998 .tbtn.on { border-style: inset; background: #a0a0a0; color: #000; }
.y1998 .trail li { background: #fff; border: 1px solid #000; color: #000; }
.y1998 .foot-title, .y1998 .foot-kicker, .y1998 .fine, .y1998 .portrait figcaption { color: #fff; }
.y1998 .about-lead { color: #000080; font-family: "Arial", sans-serif; }
.y1998 .toast { background: #ffffe0; color: #000; border: 1px solid #000; font-family: "Times New Roman", serif; }
.y1998 .sticker { border-color: #000; box-shadow: 3px 3px 0 #000; }
.y1998 .odometer span { background: #000; color: #0f0; border: 1px solid #0f0; font-family: "Courier New", monospace; }
.y98-counter { display: none; }
.y1998 .y98-counter { display: inline-block; margin-left: 10px; background: #000; color: #0f0; padding: 1px 6px; font: 12px "Courier New", monospace; }
.y98-uc { display: none; }
.y1998 .y98-uc {
  display: inline-block; margin: 0 0 14px; padding: 6px 12px; background: repeating-linear-gradient(-45deg, #ffd800 0 10px, #111 10px 20px);
  color: #111; font: bold 13px "Arial", sans-serif;
}
.y1998 .y98-uc b { background: #ffd800; padding: 2px 6px; }

/* ---------- 404 ---------- */
.lost-main { min-height: 100svh; display: grid; align-content: center; gap: 18px; }
.lost-title { margin: 0; font-size: clamp(54px, 10vw, 150px); line-height: 0.9; letter-spacing: -0.05em; font-weight: 750; font-variation-settings: "wdth" 80, "opsz" 96; }
.lost-title .iri { font-weight: 400; letter-spacing: -0.02em; }
.lost-text { max-width: 480px; font-size: 20px; color: var(--ink-2); margin: 0 0 10px; }
