@font-face {
  font-family: "Comic Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ComicNeue-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Comic Neue";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ComicNeue-Bold.ttf") format("truetype");
}

:root {
  --ink: #1a1a1a;
  --paper: #fff36a;
  --hot: #ff2f92;
  --lime: #b6ff00;
  --sky: #7af0ff;
  --comic: "Comic Sans MS", "Comic Neue", "Comic Sans", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 980px;
  color: var(--ink);
  font-family: var(--comic);
  background-color: #12005a;
  background-image:
    radial-gradient(circle, #fff 1.2px, transparent 1.4px),
    radial-gradient(circle, #ffe14d 1px, transparent 1.2px);
  background-size: 28px 28px, 46px 46px;
  background-position: 0 0, 12px 18px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='24' font-size='24'%3E%E2%98%85%3C/text%3E%3C/svg%3E") 4 4, auto;
}

.sky {
  width: min(1100px, calc(100% - 24px));
  margin: 12px auto 28px;
}

.banner {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: stretch;
  padding: 14px 16px 18px;
  background: repeating-linear-gradient(
    90deg,
    #ff1744 0 40px,
    #ff9100 40px 80px,
    #ffeb3b 80px 120px,
    #00e676 120px 160px,
    #2979ff 160px 200px,
    #d500f9 200px 240px
  );
  border: 6px ridge #fff;
  box-shadow: 6px 6px 0 #000;
}

.banner-copy {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 4px inset #ff2f92;
}

.best-viewed {
  margin: 0 0 4px;
  text-align: center;
  font-size: 13px;
  color: #c4006a;
}

.logo {
  margin: 0;
  text-align: center;
  font-size: 58px;
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 #fff, 5px 5px 0 #000;
}

.logo span:nth-child(6n + 1) { color: #ff1744; }
.logo span:nth-child(6n + 2) { color: #ff6d00; }
.logo span:nth-child(6n + 3) { color: #c6a700; }
.logo span:nth-child(6n + 4) { color: #00a152; }
.logo span:nth-child(6n + 5) { color: #2962ff; }
.logo span:nth-child(6n + 6) { color: #aa00ff; }

.tagline {
  margin: 6px 0 0;
  text-align: center;
  font-size: 18px;
  color: #5a0080;
}

.login-box {
  width: 250px;
  flex: none;
  padding: 10px;
  background: #ffe14d;
  border: 5px ridge #ff1744;
  box-shadow: inset 0 0 0 3px #fff;
}

.login-box h2 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  color: #d50000;
  text-shadow: 1px 1px 0 #fff;
}

.login-hint {
  margin: 4px 0 8px;
  text-align: center;
  font-size: 13px;
}

.login-box label,
.form-panel label,
.guest-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.login-box input,
.form-panel input,
.form-panel textarea,
.guest-form input,
.guest-form textarea {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 4px 6px;
  font-family: var(--comic);
  font-size: 15px;
  border: 3px inset #888;
  background: #fff;
}

.login-box button,
.form-panel button,
.guest-form button,
.menu button,
.webring button {
  font-family: var(--comic);
  cursor: pointer;
}

.login-box button,
.form-panel button,
.guest-form button {
  display: block;
  width: 100%;
  padding: 6px 8px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(#ff5c8a, #d1005c);
  border: 3px outset #ffd0e0;
}

.login-box button:active,
.form-panel button:active,
.guest-form button:active {
  border-style: inset;
}

.login-message {
  min-height: 1.2em;
  margin: 8px 0 0;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
}

.login-message.ok {
  color: #0b6b12;
}

.login-message.bad,
.form-error {
  color: #c40000;
}

.login-box.shake {
  animation: shake 0.35s linear;
}

marquee {
  display: block;
  margin-top: 8px;
  padding: 4px 0;
  background: #000;
  color: #b6ff00;
  font-size: 16px;
  border: 3px solid #b6ff00;
}

.site {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.sidebar,
.panel,
footer {
  background: var(--paper);
  border: 5px ridge var(--hot);
  box-shadow: 5px 5px 0 #000;
}

.sidebar {
  padding: 10px;
  background:
    linear-gradient(#fff36a, #fff36a),
    repeating-linear-gradient(45deg, #ffe14d, #ffe14d 8px, #fff6a8 8px 16px);
}

.mascot-card {
  padding: 8px;
  text-align: center;
  background: #fff;
  border: 4px dashed #2962ff;
}

.mascot-bounce {
  animation: bounce 1.1s ease-in-out infinite;
}

.mascot {
  width: 180px;
  height: auto;
}

.lid {
  transform-box: fill-box;
  transform-origin: center top;
  animation: blinkeye 4.2s infinite;
}

.lid-right {
  animation-delay: 0.05s;
}

.arm-wave {
  transform-box: fill-box;
  transform-origin: 80% 80%;
  animation: wave 0.55s ease-in-out infinite;
}

.mascot-name {
  margin: 0;
  font-size: 28px;
  color: #d50000;
  letter-spacing: 4px;
  text-shadow: 2px 2px 0 #fff;
}

.speech {
  margin: 6px 0 0;
  padding: 8px;
  background: #e8f7ff;
  border: 3px solid #2979ff;
  border-radius: 16px;
  font-size: 15px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.menu a,
.menu button,
.webring button {
  display: block;
  padding: 6px 8px;
  text-align: center;
  text-decoration: underline;
  color: #0000ee;
  background: #7af0ff;
  border: 3px outset #fff;
  font-size: 16px;
}

.menu a:visited {
  color: #551a8b;
}

.menu button {
  color: #7a0030;
  background: #ff9ec8;
  font-weight: bold;
}

.counter-box,
.construction,
.webring {
  margin-top: 10px;
  padding: 8px;
  text-align: center;
  background: #000;
  color: #39ff14;
  border: 3px inset #39ff14;
}

.counter-box p,
.webring p,
.construction p {
  margin: 4px 0;
}

.counter {
  font-family: "Courier New", monospace;
  font-size: 28px;
  letter-spacing: 3px;
  color: #ff2f92;
  background: #111;
  border: 2px solid #fff;
}

.since {
  font-size: 12px;
  color: #b6ff00;
}

.construction {
  background: #ffeb3b;
  color: #000;
  border-color: #000;
}

.stripes {
  height: 18px;
  margin-bottom: 6px;
  background: repeating-linear-gradient(
    -45deg,
    #111,
    #111 8px,
    #ffeb3b 8px 16px
  );
  animation: slide 0.8s linear infinite;
}

.webring {
  background: #ffe1f2;
  color: #000;
  border-color: #ff2f92;
}

.webring button {
  display: inline-block;
  width: auto;
  margin: 2px;
  padding: 3px 6px;
  font-size: 13px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel {
  padding: 12px 16px 16px;
}

.panel h2 {
  margin: 0 0 8px;
  padding-bottom: 4px;
  font-size: 28px;
  color: #5a0080;
  border-bottom: 4px dotted #ff2f92;
}

.intro p,
.form-panel p,
.joke p {
  font-size: 18px;
  line-height: 1.35;
}

.intro-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.home-photo {
  flex: 0 0 210px;
  margin: 0;
  padding: 6px;
  text-align: center;
  background: #fff7a8;
  border: 5px ridge #ff1744;
}

.home-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid #000;
}

.home-photo figcaption {
  margin-top: 6px;
  font-size: 14px;
}
  padding: 8px;
  background: #fff;
  border: 3px dashed #ff2f92;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.badges li {
  padding: 4px 8px;
  background: #7af0ff;
  border: 3px outset #fff;
}

.joke {
  margin-top: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 4px groove #2962ff;
}

.joke.alt {
  background: #e7ffe4;
  border-color: #00a152;
}

.joke h3 {
  margin: 0 0 4px;
  color: #d50000;
}

.rating {
  margin-bottom: 0;
  font-size: 14px;
  color: #7a4b00;
}

.form-panel {
  background: #fff0f7;
}

.form-error {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-weight: bold;
}

.joke-result {
  margin-top: 12px;
  padding: 12px;
  text-align: center;
  background: #fff;
  border: 6px ridge #ff1744;
}

.joke-result .from-olik {
  margin: 0;
  font-size: 16px;
  color: #2962ff;
}

.joke-result #joke-result-text {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.25;
  color: #d50000;
}

.joke-result.ok {
  border-color: #00a152;
}

.joke-result.ok #joke-result-text {
  color: #0b6b12;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.gallery figure {
  margin: 0;
  padding: 6px;
  text-align: center;
  background: #fff;
  border: 4px ridge #ff2f92;
}

.gallery img,
.photo-main img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid #000;
  background: #fff;
}

.photo-main {
  margin: 10px 0 12px;
  padding: 8px;
  text-align: center;
  background: #fff7a8;
  border: 6px ridge #ff1744;
  box-shadow: 4px 4px 0 #000;
}

.photo-main img {
  width: auto;
  max-width: min(420px, 100%);
  margin: 0 auto;
}

.photo-badge {
  margin: 0 0 8px;
  color: #d50000;
  font-size: 18px;
}

.photo-main figcaption {
  margin-top: 8px;
  font-size: 18px;
}

.gallery figcaption {
  margin-top: 4px;
  font-size: 14px;
}

.photo-wait {
  margin: 0;
  padding: 16px;
  text-align: center;
  background: #fff;
  border: 4px dashed #2962ff;
}

.guest {
  margin-top: 8px;
  padding: 8px;
  background: #fff;
  border: 3px solid #000;
}

.guest.pink {
  background: #ffe1f2;
}

.who {
  margin: 0 0 4px;
  font-size: 14px;
  color: #0000ee;
  text-decoration: underline;
}

.guest p:last-child {
  margin: 0;
}

footer {
  margin-top: 12px;
  padding: 10px;
  text-align: center;
  background: #000;
  color: #7af0ff;
  border-color: #7af0ff;
}

footer p {
  margin: 4px 0;
}

.made {
  color: #ffe14d;
}

.credit {
  margin-top: 8px;
  font-family: var(--comic);
  font-size: 20px;
  color: #fff;
}

.credit a {
  color: #ff5c8a;
  font-family: var(--comic);
  font-weight: bold;
  text-decoration: underline;
}

.blink {
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% { visibility: hidden; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes wave {
  0%, 100% { transform: rotate(10deg); }
  50% { transform: rotate(-16deg); }
}

@keyframes blinkeye {
  0%, 92%, 100% { transform: scaleY(0); }
  95% { transform: scaleY(1); }
}

@keyframes slide {
  from { background-position: 0 0; }
  to { background-position: 32px 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.wheels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.wheel-card {
  flex: 1 1 280px;
  max-width: 360px;
  padding: 10px;
  text-align: center;
  background: #fff7a8;
  border: 5px ridge #ff1744;
}

.wheel-card.alt {
  background: #e5ffe8;
  border-color: #00a152;
}

.wheel-card h3 {
  margin: 0;
  font-size: 22px;
}

.wheel-name {
  margin: 4px 0 8px;
  color: #d50000;
  font-size: 20px;
  font-weight: bold;
}

.wheel-stage {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 10px;
}

.wheel-pointer {
  position: absolute;
  z-index: 2;
  top: -2px;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -14px;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid #d50000;
  filter: drop-shadow(2px 2px 0 #000);
}

.fortune {
  display: block;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 6px solid #000;
  background: #fff;
  transition: transform 4.2s cubic-bezier(0.12, 0.65, 0.08, 1);
}

.spin-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-family: var(--comic);
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(#ff5c8a, #d1005c);
  border: 3px outset #ffd0e0;
}

.wheel-card.alt .spin-btn {
  background: linear-gradient(#7dff9a, #00a152);
  border-color: #d4ffd8;
}

.wheel-result {
  min-height: 3em;
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: bold;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .sky {
    width: auto;
    margin: 8px;
  }

  .banner,
  .site {
    display: block;
  }

  .login-box {
    width: auto;
    margin-top: 10px;
  }

  .logo {
    font-size: 34px;
  }

  .intro-row {
    display: block;
  }

  .home-photo {
    margin-top: 12px;
  }

  .wheels {
    display: block;
  }

  .wheel-card {
    max-width: none;
    margin-bottom: 14px;
  }
}
