:root {
  --pink: #ff52cf;
  --hot-pink: #ff1493;
  --purple: #5c16a8;
  --deep-purple: #25004c;
  --aqua: #62fff2;
  --yellow: #fff56b;
  --paper: #fffafd;
  --ink: #211437;
  --chrome: #d9d9e4;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 300px;
  color: var(--ink);
  font-family: "Comic Sans MS", "Chalkboard SE", cursive;
  background-color: #661eb0;
  background-image:
    linear-gradient(45deg, #7f2acf 25%, transparent 25%),
    linear-gradient(-45deg, #7f2acf 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #7f2acf 75%),
    linear-gradient(-45deg, transparent 75%, #7f2acf 75%);
  background-size: 28px 28px;
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  cursor: crosshair;
}

button, input, textarea { font: inherit; }
a, button { cursor: pointer; }

.skip-link {
  position: fixed;
  top: 8px;
  left: -999px;
  z-index: 99;
  padding: 8px;
  background: #fff;
  color: #000;
}
.skip-link:focus { left: 8px; }

.star-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Ctext x='8' y='22' font-size='16' fill='%23ffffff'%3E%E2%98%85%3C/text%3E%3Ctext x='59' y='61' font-size='12' fill='%23fff56b'%3E%E2%9C%A6%3C/text%3E%3C/svg%3E");
}

.page-shell {
  position: relative;
  width: min(980px, calc(100% - 24px));
  margin: 18px auto;
}

.top-marquee {
  overflow: hidden;
  border: 3px ridge #fff;
  background: #090014;
  color: var(--yellow);
  font: bold 14px/28px "Courier New", monospace;
  white-space: nowrap;
}

.marquee-track {
  width: max-content;
  animation: marquee 18s linear infinite;
}

.masthead {
  padding: 14px 18px 0;
  text-align: center;
  border: 4px ridge #fff;
  background:
    radial-gradient(circle at 15% 30%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 78% 22%, #fff56b 0 2px, transparent 3px),
    linear-gradient(180deg, #ff8ee1, #9238d2 58%, #3a0968);
  background-size: 45px 45px, 66px 66px, auto;
}

.construction {
  display: inline-block;
  margin: 0;
  padding: 2px 8px;
  color: #14011e;
  background: var(--yellow);
  border: 2px dashed #000;
  font: bold 12px "Courier New", monospace;
}

.masthead h1 {
  margin: 2px 0 0;
  line-height: .9;
  transform: rotate(-2deg);
}

.masthead h1 span {
  display: inline-block;
  color: #fff;
  font: 900 clamp(50px, 10vw, 98px)/.9 Impact, Haettenschweiler, sans-serif;
  letter-spacing: 2px;
  -webkit-text-stroke: 3px #4d006f;
  text-shadow:
    3px 3px 0 #ff22ad,
    6px 6px 0 #7925bb,
    9px 9px 0 #341357,
    0 0 14px #fff;
}

.masthead h1 b {
  display: inline-block;
  margin-left: 8px;
  color: var(--aqua);
  font: italic 900 clamp(31px, 6vw, 58px) "Comic Sans MS", cursive;
  text-shadow: 2px 2px 0 #2b0051, 4px 4px 0 var(--hot-pink);
}

.tagline {
  margin: 9px 0 14px;
  color: white;
  font-size: clamp(15px, 2.5vw, 21px);
  text-shadow: 2px 2px #5d006d;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: -18px;
  padding: 5px;
  border-top: 3px ridge white;
  background: var(--chrome);
  font: 12px Tahoma, sans-serif;
  text-align: left;
}

.browser-button, .go {
  padding: 2px 8px;
  border: 2px outset #fff;
  background: #ececf1;
}

.address {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 3px 6px;
  border: 2px inset #fff;
  background: white;
  white-space: nowrap;
}

.desktop-window {
  border: 4px outset #f0f0f0;
  background: var(--chrome);
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 5px;
  color: white;
  background: linear-gradient(90deg, #1f087c, #b249d4);
  font: bold 13px Tahoma, sans-serif;
}

.window-buttons { display: flex; gap: 2px; }
.window-buttons i {
  width: 19px;
  height: 18px;
  color: #111;
  background: var(--chrome);
  border: 2px outset #fff;
  font: bold 12px/14px sans-serif;
  text-align: center;
}

.desktop-grid {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 210px;
  gap: 8px;
  padding: 8px;
  align-items: start;
}

.side-nav {
  position: sticky;
  top: 8px;
  border: 3px ridge #fff;
  background: #ffd3f1;
}

.nav-title {
  margin: 0;
  padding: 6px;
  color: white;
  background: var(--purple);
  text-align: center;
  font-weight: bold;
}

.side-nav a, .side-nav > button {
  display: block;
  width: calc(100% - 12px);
  margin: 6px;
  padding: 7px 6px;
  color: #3e075e;
  border: 2px outset #fff;
  background: linear-gradient(#fff, #ffb7e9);
  font-weight: bold;
  text-align: left;
  text-decoration: none;
}

.side-nav a:focus-visible, .side-nav a:hover,
.side-nav > button:focus-visible, .side-nav > button:hover {
  color: white;
  outline: 2px dotted #180026;
  background: var(--hot-pink);
}

.pet-box {
  margin: 10px 6px;
  padding: 6px;
  border: 2px inset #fff;
  background: #fff;
  font: 10px "Courier New", monospace;
}
.pet-box p { margin: 0 0 4px; }
.pet-box strong { color: #d00083; }
.meter { height: 9px; margin-top: 5px; border: 1px solid #222; background: #eee; }
.meter span { display: block; width: 94%; height: 100%; background: repeating-linear-gradient(90deg, #61f4ca 0 8px, #fff 8px 10px); }

.counter {
  margin: 8px 6px;
  text-align: center;
  font: 10px "Courier New", monospace;
}
.counter span { display: block; }
.counter strong {
  display: inline-block;
  padding: 3px 5px;
  color: #ff5252;
  background: #060606;
  border: 2px inset #fff;
  font: 18px "Courier New", monospace;
  letter-spacing: 2px;
}

.main-column { min-width: 0; }
.welcome-panel {
  padding: 12px;
  text-align: center;
  border: 3px ridge #fff;
  background:
    radial-gradient(circle, #ff94dc 0 2px, transparent 3px) 0 0 / 18px 18px,
    #fff7fc;
}

.speech {
  position: relative;
  width: max-content;
  max-width: 90%;
  margin: 0 auto -2px;
  padding: 6px 10px;
  color: #4e0575;
  border: 3px solid #4e0575;
  background: white;
  font-weight: bold;
}
.speech::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 12px;
  height: 12px;
  border-right: 3px solid #4e0575;
  border-bottom: 3px solid #4e0575;
  background: #fff;
  transform: rotate(45deg);
}

.bunny-button {
  position: relative;
  width: 220px;
  max-width: 78%;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(5px 6px 0 rgba(76, 0, 99, .22));
}
.bunny-button:hover .photo-bunny { animation: hop .55s steps(2) infinite; }
.bunny-button:focus-visible { outline: 4px dashed var(--hot-pink); outline-offset: 4px; }
.photo-bunny {
  display: block;
  width: 100%;
  height: auto;
  margin: -8px auto 4px;
}

.welcome-panel h2 {
  margin: 0 0 4px;
  color: #7217a6;
  font-size: 22px;
  text-shadow: 2px 2px var(--aqua);
}
.welcome-panel p { margin: 6px auto; max-width: 47ch; font-size: 14px; }
.welcome-panel .last-updated { color: #7f0879; font: 11px "Courier New", monospace; }

.blinkies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 8px 0;
}
.blinkie {
  min-width: 120px;
  padding: 3px 8px;
  border: 2px ridge white;
  font: bold 10px "Courier New", monospace;
  text-align: center;
  text-shadow: 1px 1px #000;
}
.blinkie.pink { color: white; background: repeating-linear-gradient(-45deg, #ff1baa 0 5px, #79055b 5px 10px); }
.blinkie.acid { color: white; background: repeating-linear-gradient(90deg, #23cf7a 0 5px, #1b6dff 5px 10px); }
.blinkie.silver { color: #fff; background: linear-gradient(#fff, #686878, #fff); }

.panel {
  margin-bottom: 8px;
  border: 3px ridge #fff;
  background: #fff;
}
.panel h2 {
  margin: 0;
  padding: 5px 7px;
  color: white;
  background: var(--purple);
  font-size: 15px;
  text-align: center;
}

.guestbook form, .mail-club form { padding: 10px; }
label { display: block; margin: 0 0 3px; font-size: 11px; font-weight: bold; }
input, textarea {
  width: 100%;
  margin: 0 0 8px;
  padding: 6px;
  color: #230030;
  border: 2px inset #fff;
  border-radius: 0;
  background: #fffafc;
  font: 12px "Courier New", monospace;
}
textarea { min-height: 68px; resize: vertical; }
input:focus, textarea:focus { outline: 3px solid var(--aqua); }
form button {
  padding: 5px 9px;
  color: #260032;
  border: 3px outset #fff;
  border-radius: 0;
  background: #ff9ddb;
  font-weight: bold;
}
form button:active { border-style: inset; }

.guestbook-entries { border-top: 2px dashed #c382bc; }
.guestbook-entries article { padding: 7px 10px; border-bottom: 1px dotted #ba8eb5; }
.guestbook-entries article:nth-child(odd) { background: #fff0fa; }
.guestbook-entries strong { color: #a40079; font-size: 12px; }
.guestbook-entries time { float: right; color: #777; font: 10px "Courier New", monospace; }
.guestbook-entries p { margin: 3px 0 0; font-size: 12px; }

.facts dl { margin: 0; }
.facts dl div { display: grid; grid-template-columns: 58px 1fr; border-bottom: 1px dotted #ab7ca9; font-size: 12px; }
.facts dt { padding: 5px; color: #7217a6; background: #ffe6f6; font-weight: bold; }
.facts dd { margin: 0; padding: 5px; }

.mail-club { background: #fff6a5; }
.mail-club p { margin: 8px; font-size: 12px; }
.mail-club #club-status { min-height: 16px; color: #a90072; font-weight: bold; }

.links a {
  display: block;
  padding: 5px 7px;
  color: #3400a0;
  font-size: 12px;
}
.links a:visited { color: #a00086; }
.webring {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin: 8px;
  padding: 6px;
  color: white;
  border: 2px dashed var(--yellow);
  background: #140020;
  font: 9px "Courier New", monospace;
  text-align: center;
}
.webring b { color: var(--yellow); }

.best-viewed { display: block; width: 180px; max-width: 100%; margin: 12px auto; image-rendering: pixelated; }

footer {
  padding: 10px;
  color: white;
  text-align: center;
  text-shadow: 2px 2px #390061;
  font: 11px "Courier New", monospace;
}
footer p { margin: 3px; }

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  max-width: 280px;
  padding: 9px 12px;
  color: #fff;
  border: 3px outset #fff;
  background: var(--purple);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
}
.toast.show { opacity: 1; }

.cursor-star {
  position: fixed;
  z-index: 100;
  color: var(--yellow);
  pointer-events: none;
  animation: star-out .65s linear forwards;
  text-shadow: 1px 1px var(--hot-pink);
}

body.max-sparkle .star-field { opacity: .55; animation: shimmer .8s steps(2) infinite; }
body.max-sparkle .masthead h1 span { animation: rainbow 1.1s steps(6) infinite; }

@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes hop { 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes star-out { to { transform: translateY(25px) rotate(160deg); opacity: 0; } }
@keyframes shimmer { 50% { filter: hue-rotate(90deg); } }
@keyframes rainbow { 50% { filter: hue-rotate(160deg); } }

@media (max-width: 760px) {
  .page-shell { width: min(600px, calc(100% - 12px)); margin-block: 6px; }
  .desktop-grid { grid-template-columns: 132px minmax(0, 1fr); }
  .right-rail { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .right-rail .links { grid-column: 1 / -1; }
  .right-rail .panel { margin: 0; }
  .right-rail .best-viewed { grid-column: 1 / -1; }
  .side-nav { position: static; }
}

@media (max-width: 520px) {
  .masthead { padding-inline: 8px; }
  .masthead h1 span { -webkit-text-stroke-width: 2px; }
  .browser-bar { margin-inline: -8px; }
  .desktop-grid { display: block; }
  .side-nav { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 8px; }
  .side-nav .nav-title, .side-nav .pet-box, .side-nav .counter { grid-column: 1 / -1; }
  .side-nav a, .side-nav > button { width: auto; margin: 4px; font-size: 11px; }
  .right-rail { display: block; }
  .right-rail .panel { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; }
  .cursor-star { display: none; }
}
