  /* Welcome screen / splash */
  .welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(10deg, #F66633, #6969F3) no-repeat center center;
    background-size: cover;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* Scroll is the safety net: if the content column ever outgrows a
       short viewport, the ENTER button must stay reachable */
    overflow-x: hidden;
    overflow-y: auto;
    transition: opacity 0.5s ease;
    opacity: 0;
  }
  
  .welcome-screen.active {
    display: flex;
    opacity: 1;
  }
  
  .content-container {
    text-align: center;
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 100;
    /* auto margins keep the column centred yet scrollable-from-the-top
       when it overflows the flex parent */
    margin: auto;
    /* Escape hatch independent of `safe center`: if the column ever grows
       taller than the viewport, it scrolls within itself so the ENTER
       button stays reachable even where `align-items: safe center` is
       unsupported. */
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    /* Start hidden to avoid a flash of fully-opaque content before the
       fade begins; visibility is restored by the .active class rule
       below (not by the animation's fill), so a cancelled/never-run
       animation (bfcache restore, reduced motion) still degrades to
       "visible immediately" rather than "invisible forever". */
    opacity: 0;
  }

  .welcome-screen.active .content-container {
    opacity: 1;
    animation: fadeIn 2s ease-in-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .word-art-container {
    perspective: 500px;
    padding: 20px;
    margin-bottom: 30px;
    transform-origin: center center;
    animation: float1 12s ease-in-out infinite;
    will-change: transform;
  }
  
  /* Multiple float animations with different patterns */
  @keyframes float1 {
    0% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(2deg); }
    50% { transform: translateY(5px) rotate(-1deg); }
    75% { transform: translateY(-10px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
  }
  
  @keyframes float2 {
    0% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(-2deg); }
    66% { transform: translateY(5px) rotate(3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
  }
  
  @keyframes float3 {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    25% { transform: translateY(-10px) translateX(5px) rotate(1deg); }
    50% { transform: translateY(5px) translateX(-5px) rotate(-1deg); }
    75% { transform: translateY(-5px) translateX(0px) rotate(1deg); }
    100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
  }

  /* if wordart wasn't enough */
  @keyframes disco {
    0% { 
      text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 30px #ff0000; 
    }
    20% { 
      text-shadow: 
        0 0 10px #ffff00,
        0 0 20px #ffff00,
        0 0 30px #ffff00; 
    }
    40% { 
      text-shadow: 
        0 0 10px #00ff00,
        0 0 20px #00ff00,
        0 0 30px #00ff00; 
    }
    60% { 
      text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff; 
    }
    80% { 
      text-shadow: 
        0 0 10px #0000ff,
        0 0 20px #0000ff,
        0 0 30px #0000ff; 
    }
    100% { 
      text-shadow: 
        0 0 10px #ff00ff,
        0 0 20px #ff00ff,
        0 0 30px #ff00ff; 
    }
  }

  /* im an ally */
  @keyframes rainbow-text {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
  }

  /* Add a new small text element under the word art */
  .word-art-small {
    font-family: "Comic Sans MS", cursive, sans-serif;
    font-size: 24px;
    color: #ffffff;
    text-shadow: 2px 2px 0 #000000;
    animation: blink 1.5s ease-in-out infinite, rainbow-text 3s linear infinite;
    margin-bottom: 40px;
  }

  /* blinking-guy.gif */
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
  }

  /* Using the same color cycling as brady.css */
  .word-art {
    font-family: "Impact", "Arial Black", sans-serif;
    /* Sized against the smaller viewport dimension so one rule fits
       portrait, landscape, and desktop without orientation cliffs */
    font-size: 72px;
    font-size: clamp(28px, min(9vw, 13vh), 72px);
    font-weight: bold;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
    transform: perspective(500px) rotateX(20deg) rotateY(-5deg);
    text-rendering: geometricPrecision;
    filter: drop-shadow(4px 4px 0px #000)
           drop-shadow(-4px -4px 0px #000)
           drop-shadow(4px -4px 0px #000)
           drop-shadow(-4px 4px 0px #000);
    position: relative;
    -webkit-text-stroke: 2px #000;
    animation: cycleh1 15s linear 0s infinite, disco 10s linear infinite;
    -webkit-animation: cycleh1 15s linear 0s infinite, disco 10s linear infinite;
    padding: 10px;
    margin-bottom: 10px;
  }
  
  /* The "WEB PAGE" line gets its own larger clamp so it also shrinks
     in short landscape viewports. The splash word-art sizing and the
     short-viewport tier below are intentionally mirrored in
     retro-splash-page.html (the two splash pages share no stylesheet);
     keep them in sync. */
  .word-art.word-art-large {
    font-size: clamp(34px, min(11vw, 16vh), 90px);
  }

  /* Mobile responsiveness for WordArt */
  @media (max-width: 768px) {
    .word-art {
      filter: drop-shadow(3px 3px 0px #000)
             drop-shadow(-3px -3px 0px #000)
             drop-shadow(3px -3px 0px #000)
             drop-shadow(-3px 3px 0px #000);
    }
    .word-art-container {
      padding: 10px;
    }
  }

  @media (max-width: 480px) {
    .word-art {
      filter: drop-shadow(2px 2px 0px #000)
             drop-shadow(-2px -2px 0px #000)
             drop-shadow(2px -2px 0px #000)
             drop-shadow(-2px 2px 0px #000);
    }
    .word-art-small {
      font-size: 18px;
    }
    .enter-button {
      padding: 10px 30px;
      font-size: 20px;
    }
  }

  /* Short-viewport tier: a landscape phone is wide but ~320-430px
     tall, so width breakpoints never fire. Tighten the vertical
     rhythm and keep the bottom band clear of the ENTER button. */
  @media (max-height: 520px) {
    /* Shrink the main column so it fits a toolbar-height landscape
       viewport: once it fits, the body's centring plus the bottom
       padding lift it clear of the fixed trigger cluster instead of
       overflowing and flowing underneath it. */
    .header {
      padding: 0.2em;
    }
    .header h1 {
      font-size: clamp(1.5em, 8vh, 5em);
      margin-bottom: 0.1em;
    }
    .container {
      height: 40px;
      margin-bottom: 0.4em;
    }
    .main {
      /* Keep flowing text clear of the fixed trigger cluster */
      padding-bottom: 84px;
      padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }
    .main p {
      padding: 0.15em 0.5em;
    }
    .word-art-container {
      padding: 6px;
      margin-bottom: 10px;
    }
    .word-art-small {
      font-size: 16px;
      margin-bottom: 16px;
    }
    .enter-button {
      padding: 8px 26px;
      font-size: 18px;
    }
    /* Let an over-tall splash scroll from the top rather than clipping
       its heading when it can't be centred. */
    .welcome-screen {
      align-items: safe center;
    }
    /* In a short landscape viewport the scrolling marquee and the hit
       counter collide with the ENTER button and trigger cluster, so
       drop both decorations here - the "Under Construction" charm is
       still carried by .word-art-small above. */
    .marquee,
    .hit-counter {
      display: none;
    }
  }
  
  .enter-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(to bottom, #ff9966, #ff6633);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 
      0 5px 15px rgba(0, 0, 0, 0.5),
      0 0 20px rgba(255, 255, 255, 0.4);
    animation: pulse 2s infinite ease-in-out;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    will-change: transform, box-shadow;
  }
  
  @keyframes pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.9; }
  }
  
  .enter-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
      0 8px 20px rgba(0, 0, 0, 0.6),
      0 0 30px rgba(255, 255, 255, 0.6);
  }
  
  .enter-button:after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
      rgba(255, 255, 255, 0.2),
      rgba(255, 255, 255, 0.05)
    );
    transform: rotate(45deg);
    transition: all 0.3s;
  }
  
  .enter-button:hover:after {
    left: 120%;
    top: 120%;
    transition: all 0.6s;
  }
  
  .marquee {
    position: fixed;
    bottom: 20px;
    width: 100%;
    font-family: "Comic Sans MS", cursive, sans-serif;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    color: #ffffff;
    text-shadow: 1px 1px 2px black;
    z-index: 100;
    pointer-events: none;
  }
  
  .marquee-content {
    display: inline-block;
    padding-left: 50%; /* Initial position beyond the container */
    animation: marquee 60s linear infinite;
    white-space: nowrap;
  }
  
  @keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); } /* Move the content's full width */
  }
  
  /* Mobile adjustments for marquee */
  @media (max-width: 480px) {
    .marquee {
      font-size: 12px;
      bottom: 10px;
    }
  }
  
  .hit-counter {
    position: fixed;
    bottom: 50px;
    right: 30px;
    font-family: "Courier New", monospace;
    background-color: #000;
    color: #0f0;
    padding: 5px 10px;
    border: 2px solid #0f0;
    border-radius: 5px;
    z-index: 100;
  }
  
  .star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    animation: twinkle 1s infinite;
    z-index: 5;
  }
  
  @keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
  }

