@font-face {
  font-family: "W95";
  src: url("assets/W95F.otf?v=2") format("opentype");
  font-display: swap;
}

:root { --navy: #000033; --yellow: #ffff00; --cyan: #00ffff; --pink: #ff00ff; --lime: #00ff00; }
* { box-sizing: border-box; }
html { min-height: 100%; background: #000018; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 24px 10px;
  overflow-x: hidden;
  background-color: #000018;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle, #7777ff 0 1px, transparent 1.5px);
  background-position: 0 0, 23px 31px;
  background-size: 47px 47px, 61px 61px;
  color: #fff;
  font-family: "Comic Sans MS", "Comic Sans", cursive;
}

.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #ffff00 0 1px, transparent 1.5px);
  background-position: 18px 9px;
  background-size: 83px 83px;
  opacity: 0.55;
}

img { max-width: 100%; }
.mirror { transform: scaleX(-1); }

.page-shell {
  position: relative;
  width: min(790px, 100%);
  margin: 0 auto;
  padding: 12px 18px 18px;
  border: 5px ridge #c0c0c0;
  background: var(--navy);
  box-shadow: 0 0 0 3px #000, 0 0 24px #000;
  text-align: center;
}

.wide-shell { width: min(960px, 100%); }

.classic-banner {
  display: block;
  width: 240px;
  margin: 0 auto;
  image-rendering: pixelated;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px auto 4px;
  padding: 7px;
  border: 3px outset #c0c0c0;
  background: #c0c0c0;
  font-family: "Courier New", monospace;
  font-weight: bold;
}

.site-nav img { width: 24px; height: 24px; }
a { color: var(--cyan); }
.site-nav a { padding: 3px 7px; color: #000080; background: #ffff00; }
.site-nav a[aria-current="page"] { color: #fff; background: #000080; }

.home-header, .inside-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 28px);
  padding: 18px 0 14px;
}

.factory-gif {
  width: 115px;
  height: 105px;
  object-fit: contain;
  image-rendering: pixelated;
}

h1 {
  margin: 0;
  color: var(--yellow);
  font-family: "W95", "Arial Black", sans-serif;
  font-size: clamp(2.2rem, 7vw, 4.9rem);
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 0.9;
  text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 #000;
}

.subtitle { margin: 15px 0 0; color: var(--cyan); font-size: clamp(1rem, 3vw, 1.45rem); font-weight: bold; }

.marquee {
  width: 100%;
  overflow: hidden;
  border-block: 2px solid var(--lime);
  background: #000;
  color: var(--lime);
  font-family: "Courier New", monospace;
  font-weight: bold;
  white-space: nowrap;
}

.marquee span { display: inline-block; min-width: 100%; padding: 5px 0; animation: marquee 10s linear infinite; }

.welcome-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 85px;
  padding-top: 12px;
}

.welcome-row img:first-child, .welcome-row img:last-child { width: 115px; }
.welcome-row img:nth-child(2) { width: 156px; }

.gif-parade {
  display: flex;
  min-height: 175px;
  align-items: end;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 8px 10px;
}

.gif-parade > img { max-width: 88px; max-height: 120px; object-fit: contain; image-rendering: pixelated; }

.notice-box { padding: 22px 12px; border: 4px outset #c0c0c0; background: #000066; }

.notice-box h2 {
  margin: 0;
  color: var(--yellow);
  font-family: "W95", "Arial Black", sans-serif;
  font-size: clamp(1.6rem, 5vw, 3.1rem);
  font-weight: 400;
  animation: blink 0.8s steps(1) infinite;
}

.sticker-row, .about-sweets {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
  min-height: 110px;
  padding: 15px 8px;
}

.sticker-row img { max-width: 105px; max-height: 85px; }

.location-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(15px, 5vw, 40px);
  margin-top: 20px;
  padding: 14px;
  border: 3px dashed var(--cyan);
  background: #000;
}

.location-box p { margin: 0; color: var(--cyan); font-size: clamp(1rem, 3vw, 1.45rem); font-weight: bold; }
.boat-gif { width: 74px; height: 82px; }
.flag-gif { width: 89px; height: 52px; }

footer {
  display: flex;
  min-height: 55px;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 10px 0;
  font-family: "Courier New", monospace;
}

footer img { max-width: 125px; max-height: 50px; }
.counter { display: inline-block; margin: 0; padding: 2px 8px; border: 3px inset #888; background: #000; color: var(--lime); font-size: 1.2rem; letter-spacing: 4px; }
.inside-header h1 { font-size: clamp(2.5rem, 8vw, 5.6rem); }
.welcome-gif { width: 190px; margin: 6px auto 18px; }

.about-box {
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border: 5px ridge #c0c0c0;
  background: #000066;
  color: var(--cyan);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: bold;
}

.about-box img { width: 135px; margin: auto; }
.about-box p { margin: 10px 0; }
.about-box .yellow { color: var(--yellow); }
.gif-divider { width: 100%; height: 20px; margin: 20px 0 4px; object-fit: fill; }
.about-sweets img { max-width: 130px; max-height: 115px; }
.gif-wall-header > img { width: 105px; }

.gif-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  padding: 14px;
  border: 4px ridge #ff00ff;
  background-image: linear-gradient(45deg, #000044 25%, #000066 25%, #000066 50%, #000044 50%, #000044 75%, #000066 75%);
  background-size: 20px 20px;
}

.gif-grid > img, .gif-grid > div { max-width: 130px; max-height: 135px; margin: auto; image-rendering: pixelated; }

.construction-pair {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 0;
}

.construction-pair img { max-width: 235px; max-height: 170px; }

@keyframes marquee { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
@keyframes blink { 50% { visibility: hidden; } }

@media (max-width: 760px) {
  body { padding: 0; }
  .page-shell { border-width: 3px; padding-inline: 10px; }
  .home-header { flex-direction: column; }
  .home-header > .factory-gif:last-child { display: none; }
  .factory-gif { width: 90px; height: auto; }
  .inside-header .factory-gif { width: 70px; }
  .welcome-row img:first-child, .welcome-row img:last-child { width: 70px; }
  .about-box { grid-template-columns: 1fr; }
  .about-box img { width: 105px; }
  .gif-grid { grid-template-columns: repeat(3, minmax(70px, 1fr)); }
  .sticker-row img { max-width: 70px; }
}

@media (max-width: 480px) {
  .site-nav { gap: 5px; font-size: 0.78rem; }
  .site-nav img { width: 18px; height: 18px; }
  .inside-header { gap: 8px; }
  .inside-header .factory-gif { width: 54px; }
  .gif-grid { grid-template-columns: repeat(2, minmax(70px, 1fr)); }
  .location-box { gap: 8px; }
  .boat-gif { width: 52px; height: auto; }
  .flag-gif { width: 60px; height: auto; }
  footer { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}
