/* Sir Mucksalot: Tom mode. How Tom thinks it should look: TomSpace, Comic Sans, a marquee, WordArt,
   every scene in a Windows 95 window, and a HIGH SCORES table. Still readable and tappable, just
   awful. CSS only (no effects script); nothing moves under reduced motion. */

:root {
  color-scheme: light;
  --ink: #000000;
  --paper: #ffffff;
  --pink: #ff00d4;
  --purple: #6a00ff;
  --yellow: #ffe600;
  --cyan: #00e5ff;
  --red: #ff1e1e;
  --lime: #66ff00;
  --silver: #c0c0c0;
  --navy: #000080;
  --comic: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  --impact: Impact, "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --win: Tahoma, "MS Sans Serif", Verdana, sans-serif;
  --bevel-out: inset -2px -2px 0 #404040, inset 2px 2px 0 #ffffff;
  --bevel-in: inset 2px 2px 0 #404040, inset -2px -2px 0 #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* the screens set display: flex; hidden must still hide them */
html { background: #ff00d4; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  color: var(--ink); font: 400 17px/1.5 var(--comic);
  background:
    radial-gradient(circle at 20% 30%, #ffffff 0 1.5px, transparent 2.5px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 80%, #ffffff 0 1px, transparent 2px) 0 0 / 31px 31px,
    repeating-conic-gradient(#ff00d4 0 25%, #a000ff 0 50%) 0 0 / 48px 48px;
}
a { color: var(--navy); }
button { font: inherit; color: inherit; margin: 0; border: 0; background: none; cursor: pointer; }
:focus-visible { outline: 3px dashed #000000; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ambient { display: none; }

/* the marquee across the top (decoration: the real header is below it) */
body::before {
  content: "\2605 Welcome 2 Camelot!!! \2605 Tom pulled the sword out first (he says) \2605 Best viewed in Netscape \2605 Ye olde guestbook is broken \2605 Welcome 2 Camelot!!! \2605 Tom pulled the sword out first (he says) \2605";
  content: "\2605 Welcome 2 Camelot!!! \2605 Tom pulled the sword out first (he says) \2605 Best viewed in Netscape \2605 Ye olde guestbook is broken \2605 Welcome 2 Camelot!!! \2605 Tom pulled the sword out first (he says) \2605" / "";
  display: block; padding: 5px 0; white-space: nowrap; overflow: hidden;
  font: 700 14px/1.3 var(--comic); color: var(--lime); background: #000000; border-bottom: 3px solid var(--lime);
  animation: tom-marquee 16s linear infinite;
}
@keyframes tom-marquee { from { text-indent: 100vw; } to { text-indent: -260vw; } }

/* ---------------- the frame ---------------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 700px; margin: 0 auto; padding: 10px 14px 4px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; background: conic-gradient(#ff1e1e, #ffe600, #66ff00, #00e5ff, #6a00ff, #ff00d4, #ff1e1e); border: 2px solid #000000; border-radius: 50%; }
.brand-name {
  padding: 2px 8px; font: 700 18px/1.2 var(--comic); color: var(--paper); background: var(--navy);
  border: 2px solid #000000; box-shadow: 3px 3px 0 #000000; transform: rotate(-2deg);
}
main { flex: 1; width: 100%; max-width: 660px; margin: 0 auto; padding: 8px 14px 28px; }
.foot { width: 100%; max-width: 660px; margin: 0 auto; padding: 6px 14px max(20px, env(safe-area-inset-bottom)); }
.foot-line { margin: 0; padding: 6px 10px; text-align: center; font: 700 13px/1.4 var(--comic); background: var(--yellow); border: 2px solid #000000; }

/* ---------------- the title ---------------- */
.title-screen { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 4vh; }
.kicker { margin: 0 0 8px; padding: 2px 10px; font: 700 13px/1.4 var(--comic); color: var(--paper); background: var(--red); border: 2px solid #000000; transform: rotate(-3deg); }
.title {
  margin: 0; padding: 0 6px; font: 400 clamp(46px, 14vw, 84px)/1 var(--impact); letter-spacing: .02em; transform: rotate(-4deg) skewX(-6deg);
  color: #ffe600; -webkit-text-stroke: 2px #000000; paint-order: stroke fill;
  text-shadow: 3px 3px 0 #ff1e1e, 6px 6px 0 #6a00ff, 9px 9px 0 #000000;
}
.title::after { content: "\2122"; content: "\2122" / ""; font-size: .3em; vertical-align: super; -webkit-text-stroke: 1px #000000; }
.tagline { max-width: 30em; margin: 24px 0 0; padding: 12px 14px; font: 400 17px/1.5 var(--comic); background: var(--paper); border: 3px solid #000000; box-shadow: 5px 5px 0 #000000; }
.meta { margin: 14px 0 0; padding: 3px 10px; font: 700 14px/1.3 var(--comic); background: var(--cyan); border: 2px solid #000000; }
.btn-begin {
  display: inline-flex; align-items: center; justify-content: center; min-width: 220px; min-height: 58px; margin: 26px 0 0; padding: 0 28px;
  font: 700 22px/1 var(--comic); color: #000000; background: linear-gradient(180deg, #b6ff7a, #66ff00 55%, #3fbf00);
  border: 3px solid #000000; border-radius: 30px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), 5px 5px 0 #000000;
}
.btn-begin:active { transform: translate(3px, 3px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), 2px 2px 0 #000000; }
.found { width: 100%; max-width: 440px; margin: 30px 0 0; }
.found-label { margin: 0 0 8px; padding: 3px 8px; font: 700 14px/1.3 var(--comic); background: var(--yellow); border: 2px solid #000000; text-align: center; }

/* ---------------- a scene: a Windows 95 window ---------------- */
.scene { position: relative; padding: 0 0 16px; background: var(--silver); border: 2px solid #000000; box-shadow: var(--bevel-out), 6px 6px 0 #000000; }
.scene-kicker { /* the title bar */
  margin: 0 0 14px; padding: 5px 10px; color: var(--paper); background: linear-gradient(90deg, #000080, #1084d0);
  font: 700 14px/1.2 var(--win);
}
.scene-kicker::after { content: " - Microsoft Adventure"; content: " - Microsoft Adventure" / ""; font-weight: 400; }
.scene-title { margin: 0 14px 12px; font: 700 clamp(24px, 7vw, 32px)/1.15 var(--comic); color: var(--purple); text-shadow: 2px 2px 0 var(--yellow); outline: none; }
.scene-text { margin: 0 12px; padding: 14px; background: var(--paper); box-shadow: var(--bevel-in); }
.scene-text p { margin: 0 0 .85em; font: 400 17.5px/1.55 var(--comic); color: #000000; }
.scene-text p:last-child { margin-bottom: 0; }
.scene-text p:first-child::first-letter { float: left; margin: .04em .1em 0 0; font: 400 3.1em/.85 var(--impact); color: var(--red); -webkit-text-stroke: 1px #000000; text-shadow: 2px 2px 0 var(--yellow); }

.choices { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px 10px 10px; text-align: left; color: #000000;
  background: var(--silver); border: 2px solid #000000; box-shadow: var(--bevel-out), 4px 4px 0 #000000;
}
.choice:active { box-shadow: var(--bevel-in); transform: translate(2px, 2px); }
.choices li:nth-child(odd) .choice { transform: rotate(-.6deg); }
.choices li:nth-child(even) .choice { transform: rotate(.6deg); }
.choice-n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; font: 400 20px/1 var(--impact); color: #000000; background: var(--yellow); border: 2px solid #000000; border-radius: 50%; }
.choices li:nth-child(2) .choice-n { background: var(--cyan); }
.choices li:nth-child(3) .choice-n { background: var(--lime); }
.choices li:nth-child(4) .choice-n { background: var(--pink); color: #ffffff; }
.choice-text { font: 700 16.5px/1.35 var(--comic); }

.scene-nav { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 0; }
.link-btn { min-height: 44px; padding: 0 14px; font: 700 14px/1 var(--win); color: #000000; background: var(--silver); border: 2px solid #000000; box-shadow: var(--bevel-out); }
.link-btn:active { box-shadow: var(--bevel-in); }
.link-btn[hidden] { display: none; }
.scene-nav .link-btn[hidden] + .link-btn { margin-left: auto; }

/* ---------------- an ending ---------------- */
.end-screen { text-align: center; }
.end-rank { display: inline-block; margin: 6px 0 10px; padding: 3px 12px; font: 700 14px/1.3 var(--comic); color: #ffffff; background: var(--red); border: 2px solid #000000; transform: rotate(-2deg); }
.end-name {
  position: relative; margin: 0 0 22px; outline: none; font: 400 clamp(36px, 11vw, 60px)/1.05 var(--impact); letter-spacing: .02em;
  color: #66ff00; -webkit-text-stroke: 2px #000000; paint-order: stroke fill; text-shadow: 3px 3px 0 #6a00ff, 6px 6px 0 #000000;
}
body[data-rank="1"] .end-name::after, body[data-rank="10"] .end-name::after {
  position: absolute; top: -14px; right: 0; padding: 4px 10px; transform: rotate(9deg);
  font: 700 14px/1 var(--comic); letter-spacing: 0; color: #ffffff; background: var(--red); border: 2px solid #000000; box-shadow: 3px 3px 0 #000000;
  -webkit-text-stroke: 0; text-shadow: none;
}
body[data-rank="1"] .end-name::after { content: "ALPHA MALE"; content: "ALPHA MALE" / ""; }
body[data-rank="10"] .end-name::after { content: "SLOP LORD"; content: "SLOP LORD" / ""; background: #7a4a00; }
.end-scene { text-align: left; }
.end-title { margin: 0 14px 12px; font: 700 22px/1.2 var(--comic); color: var(--purple); }
.ladder-head { margin: 28px 0 10px; font-size: 0; }
.ladder-head::after { content: "HIGH SCORES!!1"; content: "HIGH SCORES!!1" / ""; display: inline-block; padding: 4px 12px; font: 400 22px/1.1 var(--impact); letter-spacing: .04em; color: #ffe600; background: #000000; border: 2px solid #ffe600; }
.end-screen .found-label { margin: 12px 0 0; }
.end-screen .btn-begin { margin-top: 20px; }
.end-screen .scene-nav { justify-content: center; gap: 16px; }

/* the ladder: a high-score table */
.ladder { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; text-align: left; background: #000000; border: 3px solid var(--yellow); }
.rung { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 4px 10px 4px 6px; font: 700 15px/1.25 var(--comic); color: #8a8a8a; }
.rung-n { flex: none; width: 30px; font: 400 18px/1 var(--impact); color: var(--cyan); text-align: right; }
.rung-n::after { content: "."; content: "." / ""; }
.rung.is-found { color: #ffffff; }
.rung.is-you { color: #000000; background: var(--yellow); }
.rung.is-you .rung-n { color: var(--red); }
.rung-name { flex: 1; }
.rung-you { flex: none; padding: 2px 8px; font: 700 12px/1.2 var(--comic); color: #ffffff; background: var(--red); border: 1px solid #000000; }
.rung-you::before { content: "\2190  "; content: "\2190  " / ""; }

@media (min-width: 720px) {
  .scene-text p { font-size: 18.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  body::before { text-indent: 0; }
}
@media (forced-colors: active) {
  .title, .end-name, .scene-text p:first-child::first-letter { -webkit-text-stroke: 0; text-shadow: none; color: CanvasText; }
  body::before { display: none; }
}
