﻿/* Please give Adrian work. */

:root {
      --bg: #020607;
      --panel: #071112;
      --green: #39ff88;
      --amber: #ffd166;
      --red: #ff4d6d;
      --blue: #64d2ff;
      --muted: #9be7be;
      --border: rgba(57, 255, 136, 0.65);
    }

    * { box-sizing: border-box; }

    html { scroll-behavior: smooth; }

    html,
    body,
    a,
    button,
    summary,
    .download-button,
    .audio-control-button,
    .terminal-action-button,
    .floating-demo-button {
      cursor:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M3 2 L27 15 L16 18 L12 30 Z' fill='%23ffd166' stroke='%2339ff88' stroke-width='2'/%3E%3Cpath d='M11 10 L20 15 L14 16 Z' fill='%23000603'/%3E%3C/svg%3E") 3 2,
        auto;
    }

    body {
      margin: 0;
      background:
        radial-gradient(circle at top, rgba(57, 255, 136, 0.08), transparent 35%),
        linear-gradient(180deg, #020607 0%, #000 100%);
      color: var(--green);
      font-family: "Courier New", Courier, monospace;
      line-height: 1.5;
      min-height: 100vh;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.045),
        rgba(255, 255, 255, 0.045) 1px,
        transparent 1px,
        transparent 4px
      );
      mix-blend-mode: screen;
      z-index: 50;
    }

    body::after {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.95);
      z-index: 51;
    }

    a {
      color: var(--blue);
      text-decoration: none;
    }

    a:hover,
    a:focus {
      color: var(--amber);
      text-decoration: underline;
    }

    a:active,
    button:active,
    summary:active,
    .download-button:active,
    .audio-control-button:active {
      transform: translateY(1px);
      filter: brightness(1.25);
    }

    .terminal {
      width: min(1050px, calc(100% - 24px));
      margin: 24px auto;
      border: 2px solid var(--border);
      background: rgba(2, 8, 8, 0.92);
      box-shadow: 0 0 30px rgba(57, 255, 136, 0.22), inset 0 0 35px rgba(57, 255, 136, 0.05);
      position: relative;
      overflow: hidden;
    }

    .topbar {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 14px;
      border-bottom: 1px solid var(--border);
      background: linear-gradient(90deg, rgba(57, 255, 136, 0.13), transparent);
      font-size: 0.86rem;
      color: var(--muted);
    }

    .status-light {
      display: inline-block;
      width: 9px;
      height: 9px;
      border-radius: 999px;
      background: var(--green);
      box-shadow: 0 0 10px var(--green);
      margin-right: 6px;
    }

    .live-signal {
      color: var(--red);
      text-shadow: 0 0 8px rgba(255, 77, 109, 0.9);
      animation: pulseSignal 1.7s infinite;
      white-space: nowrap;
    }

    @keyframes pulseSignal {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.42; }
    }

    header {
      padding: 42px 24px 28px;
      border-bottom: 1px dashed var(--border);
      background:
        linear-gradient(rgba(57, 255, 136, 0.06), transparent),
        repeating-linear-gradient(
          90deg,
          rgba(57, 255, 136, 0.045),
          rgba(57, 255, 136, 0.045) 1px,
          transparent 1px,
          transparent 90px
        );
    }


    .hero-command-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 18px;
      align-items: end;
    }

    .hero-demo-actions {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      min-width: 170px;
      margin-bottom: 4px;
    }

    .terminal-action-button {
      border: 1px solid var(--amber);
      background: rgba(255, 209, 102, 0.08);
      color: var(--amber);
      padding: 9px 12px;
      font-family: inherit;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-size: 0.76rem;
      text-align: center;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 38px;
    }

    .terminal-action-button:hover,
    .terminal-action-button:focus,
    .terminal-action-button.is-playing {
      background: var(--amber);
      color: #1c1200;
      text-decoration: none;
    }

    .floating-demo-button {
      position: fixed;
      left: 50%;
      bottom: 22px;
      z-index: 85;
      transform: translate(-50%, 18px);
      opacity: 0;
      pointer-events: none;
      border: 1px solid var(--amber);
      background: rgba(4, 12, 10, 0.92);
      color: var(--amber);
      padding: 10px 16px;
      font-family: inherit;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      box-shadow: 0 0 22px rgba(255, 209, 102, 0.18), inset 0 0 14px rgba(255, 209, 102, 0.06);
      transition: opacity 0.2s ease, transform 0.2s ease, background 0.18s ease, color 0.18s ease;
      backdrop-filter: blur(2px);
    }

    .floating-demo-button.visible {
      opacity: 0.92;
      pointer-events: auto;
      transform: translate(-50%, 0);
    }

    .floating-demo-button:hover,
    .floating-demo-button:focus,
    .floating-demo-button.is-playing {
      opacity: 1;
      background: var(--amber);
      color: #1c1200;
    }

    .kicker {
      color: var(--amber);
      letter-spacing: 0.14em;
      text-transform: uppercase;
      margin: 0 0 10px;
    }

    h1 {
      margin: 0;
      font-size: clamp(2.2rem, 8vw, 5.5rem);
      line-height: 0.95;
      text-shadow: 0 0 12px rgba(57, 255, 136, 0.7);
      letter-spacing: -0.06em;
    }

    .glitch-title { display: inline-block; }

    .glitch-title:hover {
      animation: subtleGlitch 0.32s steps(2, end) 1;
    }

    @keyframes subtleGlitch {
      0% {
        transform: translate(0, 0);
        text-shadow: 0 0 12px rgba(57, 255, 136, 0.7);
      }
      25% {
        transform: translate(1px, -1px);
        text-shadow:
          1px 0 rgba(100, 210, 255, 0.45),
          -1px 0 rgba(255, 77, 109, 0.35),
          0 0 12px rgba(57, 255, 136, 0.7);
      }
      50% { transform: translate(-1px, 1px); }
      75% { transform: translate(1px, 0); }
      100% {
        transform: translate(0, 0);
        text-shadow: 0 0 12px rgba(57, 255, 136, 0.7);
      }
    }

    .cursor { animation: blink 1s steps(2, start) infinite; }

    @keyframes blink {
      50% { opacity: 0; }
    }

    .tagline {
      max-width: 820px;
      margin: 18px 0 0;
      color: #d8ffe7;
      font-size: 1.05rem;
      min-height: 12.4em;
    }

    .terminal-typed-line {
      display: block;
      min-height: 1.5em;
      white-space: pre-wrap;
    }

    .terminal-typing-caret {
      display: inline-block;
      color: var(--green);
      animation: blink 1s steps(2, start) infinite;
    }

    @media (prefers-reduced-motion: reduce) {
      .tagline { min-height: auto; }
      .terminal-typing-caret { display: none; }
    }

.typing-caret::after {
      content: "|";
      color: var(--green);
      margin-left: 2px;
      animation: blink 1s steps(2, start) infinite;
    }

    .copy-module { margin-top: 18px; }

    .copy-audio-row {
      display: flex;
      justify-content: flex-start;
      margin-top: 14px;
    }

    .narration-button {
      border: 1px solid var(--amber);
      background: rgba(255, 209, 102, 0.08);
      color: var(--amber);
      padding: 9px 13px;
      font-family: inherit;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-size: 0.76rem;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .narration-button::before {
      content: ">";
      display: inline-block;
      width: 18px;
      height: 18px;
      border: 1px solid rgba(255, 209, 102, 0.75);
      border-radius: 999px;
      line-height: 16px;
      text-align: center;
      font-size: 0.7rem;
      box-shadow: 0 0 8px rgba(255, 209, 102, 0.24);
    }

    .narration-button.is-playing::before {
      content: "||";
      font-size: 0.52rem;
    }

    .narration-button:hover,
    .narration-button:focus {
      background: var(--amber);
      color: #1c1200;
    }

    nav {
      padding: 14px;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
      border-bottom: 1px solid var(--border);
      background: rgba(7, 17, 18, 0.88);
      position: sticky;
      top: 0;
      z-index: 30;
    }

    nav a {
      border: 1px solid var(--border);
      padding: 10px;
      color: var(--green);
      text-align: center;
      background: rgba(57, 255, 136, 0.045);
      text-transform: uppercase;
      font-size: 0.9rem;
    }

    nav a:hover,
    nav a:focus {
      background: var(--green);
      color: #001b0b;
      text-decoration: none;
    }

    main { padding: 22px; }

    .panel {
      border: 1px solid var(--border);
      background: linear-gradient(180deg, rgba(11, 24, 26, 0.95), rgba(3, 8, 9, 0.95));
      box-shadow: inset 0 0 20px rgba(57, 255, 136, 0.04);
      margin-bottom: 18px;
    }

    details.panel { padding: 0; }

    details.panel > summary {
      cursor: pointer;
      padding: 18px;
      color: var(--amber);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      list-style: none;
      border-bottom: 1px dashed rgba(57, 255, 136, 0.25);
      user-select: none;
    }

    details.panel > summary::-webkit-details-marker { display: none; }

    details.panel > summary::before {
      content: "> ";
      color: var(--green);
    }

    details.panel > summary::after {
      content: " [CLOSE]";
      color: var(--muted);
      font-size: 0.72rem;
      letter-spacing: 0.05em;
    }

    details.panel:not([open]) > summary::after { content: " [OPEN]"; }

    details.panel > summary:hover {
      background: rgba(57, 255, 136, 0.06);
    }

    .panel-content { padding: 18px; }
    .compact-demo .panel-content { padding: 14px; }

    .demo-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
      margin-bottom: 10px;
    }

    .demo-header h2 { margin-bottom: 4px; }

    .panel h2,
    .panel h3 {
      margin-top: 0;
      color: var(--amber);
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .custom-audio-player {
      border: 1px solid rgba(57, 255, 136, 0.8);
      background:
        linear-gradient(180deg, rgba(5, 20, 18, 0.96), rgba(0, 5, 5, 0.96)),
        repeating-linear-gradient(
          to bottom,
          rgba(57, 255, 136, 0.05) 0px,
          rgba(57, 255, 136, 0.05) 1px,
          transparent 1px,
          transparent 5px
        );
      padding: 14px;
      margin-top: 14px;
      box-shadow:
        inset 0 0 20px rgba(57, 255, 136, 0.08),
        0 0 18px rgba(57, 255, 136, 0.14);
    }

    .custom-audio-header {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      margin-bottom: 12px;
      color: var(--amber);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-size: 0.84rem;
    }

    .custom-audio-status {
      color: var(--green);
      font-size: 0.72rem;
      text-shadow: 0 0 8px rgba(57, 255, 136, 0.7);
      white-space: nowrap;
    }

    .custom-audio-controls {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 10px;
      align-items: center;
    }

    .audio-control-button {
      border: 1px solid var(--green);
      background: rgba(57, 255, 136, 0.06);
      color: var(--green);
      padding: 8px 10px;
      font-family: inherit;
      text-transform: uppercase;
      font-size: 0.78rem;
    }

    .audio-control-button:hover,
    .audio-control-button:focus {
      background: var(--green);
      color: #001b0b;
    }

    .audio-progress-shell {
      position: relative;
      height: 14px;
      border: 1px solid rgba(57, 255, 136, 0.65);
      background:
        repeating-linear-gradient(
          90deg,
          rgba(57, 255, 136, 0.12) 0px,
          rgba(57, 255, 136, 0.12) 1px,
          transparent 1px,
          transparent 8px
        ),
        rgba(0, 0, 0, 0.5);
      cursor: pointer;
      overflow: hidden;
    }

    .audio-progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--green), var(--blue));
      box-shadow: 0 0 10px rgba(57, 255, 136, 0.75);
    }

    .audio-time {
      color: var(--muted);
      font-size: 0.78rem;
      min-width: 88px;
      text-align: right;
    }

    .audio-download-row,
    .download-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 12px;
    }

    .audio-download-button,
    .download-button {
      display: inline-block;
      border: 1px solid var(--green);
      color: var(--green);
      padding: 8px 10px;
      background: rgba(57, 255, 136, 0.06);
      text-transform: uppercase;
      font-size: 0.78rem;
    }

    .audio-download-button:hover,
    .audio-download-button:focus,
    .download-button:hover,
    .download-button:focus {
      background: var(--green);
      color: #001b0b;
      text-decoration: none;
    }

    .profile-card {
      display: grid;
      grid-template-columns: 170px 1fr;
      gap: 20px;
      align-items: start;
    }

    .profile-photo-wrap {
      border: 1px solid var(--border);
      background: rgba(0, 0, 0, 0.35);
      padding: 8px;
      box-shadow: 0 0 16px rgba(57, 255, 136, 0.16);
    }

    .profile-photo-frame {
      position: relative;
      overflow: hidden;
      border: 1px solid rgba(57, 255, 136, 0.85);
      background: #000;
      box-shadow:
        inset 0 0 22px rgba(57, 255, 136, 0.22),
        0 0 16px rgba(57, 255, 136, 0.22);
      display: block;
      width: 100%;
      padding: 0;
      font-family: inherit;
    }

    .signal-run-launch {
      appearance: none;
      -webkit-appearance: none;
      color: inherit;
      cursor: pointer;
      text-align: left;
    }

    .profile-photo-frame:hover {
      box-shadow:
        inset 0 0 22px rgba(57, 255, 136, 0.26),
        0 0 20px rgba(57, 255, 136, 0.32);
    }

    .profile-photo {
      width: 100%;
      aspect-ratio: 1 / 1;
      object-fit: cover;
      display: block;
      filter: grayscale(15%) contrast(135%) brightness(90%) sepia(10%);
      animation: selfiePhase 3.5s ease-in-out infinite;
    }

    .profile-photo-static {
      position: relative;
      z-index: 1;
    }

    .profile-photo-gif {
      position: absolute;
      inset: 0;
      z-index: 1;
      opacity: 0;
      transition: opacity 0.14s ease;
    }

    .profile-photo-frame:hover .profile-photo-gif {
      opacity: 1;
    }

    .profile-photo-frame:hover .profile-photo-static {
      opacity: 0;
    }

    .profile-game-label {
      position: absolute;
      left: 8px;
      right: 8px;
      bottom: 8px;
      z-index: 4;
      padding: 6px 8px;
      border: 1px solid rgba(57, 255, 136, 0.68);
      background: linear-gradient(90deg, rgba(0, 10, 8, 0.92), rgba(0, 24, 18, 0.72));
      color: var(--green);
      font-size: 0.56rem;
      letter-spacing: 0.08em;
      line-height: 1.2;
      pointer-events: none;
      text-transform: uppercase;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      box-shadow: 0 0 12px rgba(57, 255, 136, 0.2);
    }

    .profile-game-play-icon {
      width: 26px;
      height: 26px;
      border: 1px solid rgba(57, 255, 136, 0.78);
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      background: rgba(57, 255, 136, 0.08);
      box-shadow: inset 0 0 10px rgba(57, 255, 136, 0.12), 0 0 10px rgba(57, 255, 136, 0.14);
    }

    .profile-game-play-icon::before {
      content: "";
      display: block;
      margin-left: 2px;
      border-top: 6px solid transparent;
      border-bottom: 6px solid transparent;
      border-left: 9px solid currentColor;
    }

    .profile-game-label-copy {
      display: flex;
      flex-direction: column;
      gap: 1px;
      min-width: 0;
    }

    .profile-game-label-copy strong {
      font-size: 0.64rem;
      font-weight: 400;
      line-height: 1;
    }

    .profile-game-label-copy span {
      font-size: 0.48rem;
      opacity: 0.84;
      line-height: 1.1;
    }

    .profile-photo-frame::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 2;
      background:
        repeating-linear-gradient(
          to bottom,
          rgba(57, 255, 136, 0.22) 0px,
          rgba(57, 255, 136, 0.22) 1px,
          transparent 1px,
          transparent 4px
        );
      mix-blend-mode: screen;
      opacity: 0.45;
    }

    .profile-photo-frame::after {
      content: "";
      position: absolute;
      inset: -10%;
      pointer-events: none;
      z-index: 3;
      background:
        repeating-linear-gradient(
          90deg,
          rgba(255, 255, 255, 0.12) 0px,
          rgba(255, 255, 255, 0.12) 1px,
          transparent 1px,
          transparent 3px
        ),
        repeating-linear-gradient(
          0deg,
          rgba(57, 255, 136, 0.08) 0px,
          rgba(57, 255, 136, 0.08) 1px,
          transparent 1px,
          transparent 5px
        );
      mix-blend-mode: screen;
      animation: selfieStaticPulse 1.8s steps(2, end) infinite;
    }

    @keyframes selfiePhase {
      0%, 100% {
        transform: translate(0, 0);
        filter: grayscale(15%) contrast(135%) brightness(90%) sepia(10%);
      }
      32% {
        transform: translate(1px, -1px);
        filter: grayscale(10%) contrast(150%) brightness(100%) sepia(8%);
      }
      34% { transform: translate(-1px, 1px); }
      36%, 70% { transform: translate(0, 0); }
      74% {
        transform: translate(1px, 0);
        filter: grayscale(20%) contrast(145%) brightness(96%) sepia(12%);
      }
      76% { transform: translate(0, 0); }
    }

    @keyframes selfieStaticPulse {
      0%, 100% {
        opacity: 0.06;
        transform: translate(0, 0);
      }
      25% {
        opacity: 0.16;
        transform: translate(-2px, 1px);
      }
      50% {
        opacity: 0.08;
        transform: translate(2px, -1px);
      }
      75% {
        opacity: 0.22;
        transform: translate(-1px, 2px);
      }
    }

    .profile-label {
      margin: 8px 0 0;
      font-size: 0.72rem;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .personality-label {
      color: var(--amber);
      text-shadow: 0 0 8px rgba(255, 209, 102, 0.35);
    }

    .mission-copy {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .skill-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 2px;
    }

    .skill-tab-wrap {
      position: relative;
      display: inline-flex;
    }

    .skill-tab {
      border: 1px solid rgba(100, 210, 255, 0.82);
      color: #a9e7ff;
      background: rgba(100, 210, 255, 0.08);
      padding: 10px 14px;
      font-size: 0.94rem;
      font-family: inherit;
      text-transform: none;
      letter-spacing: 0.02em;
      line-height: 1.1;
      box-shadow: inset 0 0 12px rgba(100, 210, 255, 0.08);
    }

    .skill-tab:hover,
    .skill-tab:focus {
      background: rgba(100, 210, 255, 0.2);
      color: #e8f9ff;
      text-decoration: none;
      transform: translateY(-1px);
    }

    .skill-tab:active,
    .skill-tab.pressed {
      background: var(--blue);
      color: #031118;
      box-shadow: 0 0 16px rgba(100, 210, 255, 0.4);
    }

    .skill-tip {
      position: absolute;
      left: 0;
      top: calc(100% + 8px);
      width: max-content;
      max-width: 230px;
      background: rgba(0, 10, 10, 0.98);
      border: 1px solid rgba(100, 210, 255, 0.8);
      color: #d9f7ff;
      padding: 8px 10px;
      font-size: 0.76rem;
      line-height: 1.35;
      z-index: 40;
      box-shadow: 0 0 16px rgba(100, 210, 255, 0.18);
      opacity: 0;
      pointer-events: none;
      transform: translateY(-4px);
      transition: opacity 0.16s ease, transform 0.16s ease;
    }

    .skill-tip::before {
      content: "";
      position: absolute;
      left: 12px;
      top: -6px;
      width: 10px;
      height: 10px;
      background: rgba(0, 10, 10, 0.98);
      border-left: 1px solid rgba(100, 210, 255, 0.8);
      border-top: 1px solid rgba(100, 210, 255, 0.8);
      transform: rotate(45deg);
    }

    .skill-tab-wrap:hover .skill-tip,
    .skill-tab-wrap:focus-within .skill-tip {
      opacity: 1;
      transform: translateY(0);
    }

    .top-link-row {
      margin-top: 16px;
      text-align: right;
      border-top: 1px dashed rgba(57, 255, 136, 0.22);
      padding-top: 10px;
    }

    .top-link {
      display: inline-block;
      border: 1px solid rgba(57, 255, 136, 0.45);
      color: var(--muted);
      padding: 4px 7px;
      background: rgba(57, 255, 136, 0.035);
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .top-link:hover,
    .top-link:focus {
      background: var(--green);
      color: #001b0b;
      text-decoration: none;
    }

    .button {
      display: inline-block;
      margin-top: 10px;
      border: 1px solid var(--green);
      color: var(--green);
      padding: 9px 12px;
      background: rgba(57, 255, 136, 0.06);
      text-transform: uppercase;
    }

    .button:hover,
    .button:focus {
      background: var(--green);
      color: #001b0b;
      text-decoration: none;
    }

    .marquee {
      overflow: hidden;
      white-space: nowrap;
      border-top: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      background: rgba(255, 209, 102, 0.08);
      color: var(--amber);
      padding: 8px 0;
    }

    .marquee span {
      display: inline-block;
      padding-left: 100%;
      animation: scroll 22s linear infinite;
    }

    @keyframes scroll {
      from { transform: translateX(0); }
      to { transform: translateX(-100%); }
    }

    footer {
      padding: 18px 22px;
      border-top: 1px solid var(--border);
      color: var(--muted);
      font-size: 0.88rem;
      display: flex;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .side-tab {
      position: fixed;
      z-index: 80;
      width: 158px;
      height: 54px;
      border: 2px solid rgba(57, 255, 136, 0.72);
      background:
        linear-gradient(180deg, rgba(0, 22, 12, 0.72), rgba(0, 6, 4, 0.62));
      color: rgba(57, 255, 136, 0.88);
      font-family: inherit;
      font-size: 0.82rem;
      font-weight: bold;
      text-transform: uppercase;
      letter-spacing: 0.09em;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow:
        0 0 18px rgba(57, 255, 136, 0.22),
        inset 0 0 18px rgba(57, 255, 136, 0.08);
      padding: 0 14px;
      opacity: 0.72;
      backdrop-filter: blur(2px);
      transition:
        opacity 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
      animation: archiveTabPulse 4.2s ease-in-out infinite;
    }

    .side-tab::before {
      content: "";
      position: absolute;
      inset: 6px;
      border: 1px dashed rgba(57, 255, 136, 0.35);
      pointer-events: none;
    }

    .side-tab::after {
      content: "";
      position: absolute;
      inset: -5px;
      border: 1px solid rgba(57, 255, 136, 0.1);
      pointer-events: none;
    }

    @keyframes archiveTabPulse {
      0%, 100% {
        box-shadow:
          0 0 14px rgba(57, 255, 136, 0.18),
          inset 0 0 14px rgba(57, 255, 136, 0.08);
      }
      50% {
        box-shadow:
          0 0 26px rgba(57, 255, 136, 0.36),
          inset 0 0 20px rgba(57, 255, 136, 0.14);
      }
    }

    .side-tab:hover,
    .side-tab:focus {
      opacity: 1;
      background: rgba(57, 255, 136, 0.96);
      color: #001b0b;
      box-shadow:
        0 0 34px rgba(57, 255, 136, 0.65),
        inset 0 0 22px rgba(0, 0, 0, 0.22);
      animation-play-state: paused;
    }

    .audio-drawer-tab,
    .writing-drawer-tab {
      left: 14px;
      top: auto;
      clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
    }

    .audio-drawer-tab { bottom: 88px; }
    .writing-drawer-tab { bottom: 26px; }

    .audio-drawer-tab .tab-arrow,
    .writing-drawer-tab .tab-arrow { margin-right: 7px; }

    .video-drawer-tab,
    .social-drawer-tab {
      right: 14px;
      top: auto;
      clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    }

    .video-drawer-tab { bottom: 88px; }
    .social-drawer-tab { bottom: 26px; }

    .video-drawer-tab .tab-arrow,
    .social-drawer-tab .tab-arrow { margin-left: 7px; }

.ambient-toggle:hover,
    .ambient-toggle:focus {
      opacity: 1;
      background: rgba(255, 209, 102, 0.95);
      color: #1c1200;
    }

.side-drawer {
      position: fixed;
      top: 0;
      width: min(560px, 94vw);
      height: 100vh;
      z-index: 100;
      background:
        linear-gradient(180deg, rgba(5, 20, 18, 0.98), rgba(0, 4, 4, 0.98)),
        repeating-linear-gradient(
          to bottom,
          rgba(57, 255, 136, 0.045) 0px,
          rgba(57, 255, 136, 0.045) 1px,
          transparent 1px,
          transparent 5px
        );
      box-shadow: 0 0 32px rgba(0, 0, 0, 0.65), 0 0 22px rgba(57, 255, 136, 0.18);
      padding: 18px;
      transition: transform 0.32s ease;
      overflow-y: auto;
    }

    .video-drawer {
      right: 0;
      border-left: 2px solid var(--border);
      transform: translateX(105%);
    }

    .audio-drawer {
      left: 0;
      border-right: 2px solid var(--border);
      transform: translateX(-105%);
    }

    .video-drawer.open,
    .audio-drawer.open {
      transform: translateX(0);
    }

    .drawer-backdrop {
      position: fixed;
      inset: 0;
      z-index: 90;
      background: rgba(0, 0, 0, 0.45);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease;
    }

    .drawer-backdrop.open {
      opacity: 1;
      pointer-events: auto;
    }

    .drawer-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      border-bottom: 1px dashed rgba(57, 255, 136, 0.35);
      padding-bottom: 12px;
      margin-bottom: 14px;
    }

    .drawer-kicker {
      margin: 0 0 4px;
      color: var(--muted);
      font-size: 0.76rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .drawer-header h2 {
      margin: 0;
      color: var(--amber);
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .drawer-close {
      border: 1px solid var(--red);
      background: rgba(255, 77, 109, 0.08);
      color: var(--red);
      font-family: inherit;
      text-transform: uppercase;
      padding: 8px 10px;
    }

    .drawer-close:hover,
    .drawer-close:focus {
      background: var(--red);
      color: #120004;
    }

    .drawer-player {
      border: 1px solid rgba(57, 255, 136, 0.75);
      background: #000;
      padding: 8px;
      box-shadow: inset 0 0 18px rgba(57, 255, 136, 0.08);
    }

    .video-iframe-shell { aspect-ratio: 16 / 9; }

    .video-iframe-shell iframe {
      width: 100%;
      height: 100%;
      display: block;
      background: #000;
    }

    .instagram-drawer-shell {
      display: none;
      max-width: 190px;
      max-height: 430px;
      margin: 0 auto;
      overflow: hidden;
    }

    .instagram-drawer-shell.active {
      display: block;
    }

    .instagram-drawer-shell .instagram-media {
      min-width: 0 !important;
      max-width: 190px !important;
      width: 100% !important;
      margin: 0 auto !important;
      transform: scale(0.72);
      transform-origin: top center;
    }

    .instagram-drawer-shell iframe {
      max-height: 430px !important;
    }

    .drawer-now {
      border: 1px dashed rgba(57, 255, 136, 0.45);
      background: rgba(0, 0, 0, 0.22);
      padding: 12px;
      margin-top: 12px;
    }

    .drawer-now h3 {
      margin: 0 0 6px;
      color: var(--green);
      text-transform: uppercase;
    }

    .drawer-now p { margin-bottom: 0; }

    .drawer-list {
      display: grid;
      gap: 10px;
      margin-top: 14px;
    }

    .archive-section-hidden,
    .drawer-item-hidden {
      display: none !important;
    }

    .drawer-item {
      border: 1px solid rgba(57, 255, 136, 0.55);
      background: rgba(57, 255, 136, 0.045);
      color: var(--green);
      font-family: inherit;
      text-align: left;
      padding: 10px;
      text-transform: uppercase;
    }

    .drawer-item span {
      display: block;
      color: var(--amber);
      font-size: 0.72rem;
      margin-bottom: 3px;
    }

    .drawer-item:hover,
    .drawer-item:focus,
    .drawer-item.active {
      background: var(--green);
      color: #001b0b;
    }

    .drawer-item:hover span,
    .drawer-item:focus span,
    .drawer-item.active span {
      color: #003115;
    }

    .writing-archive {
      border-top: 1px dashed rgba(57, 255, 136, 0.35);
      margin-top: 18px;
      padding-top: 14px;
    }

    .writing-archive h3 {
      color: var(--amber);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 10px;
    }

    .writing-card {
      border: 1px dashed rgba(57, 255, 136, 0.5);
      padding: 12px;
      margin-top: 10px;
      background: rgba(0, 0, 0, 0.22);
    }

    .writing-card h4 {
      margin: 0 0 8px;
      color: var(--green);
      text-transform: uppercase;
    }


    .audio-link-archive {
      border-top: 1px dashed rgba(57, 255, 136, 0.35);
      margin-top: 18px;
      padding-top: 14px;
    }

    .audio-link-archive h3 {
      color: var(--amber);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 10px;
    }

    .file-card,
    .panel,
    .panel-content,
    summary,
    p,
    h2,
    h3,
    a {
      overflow-wrap: anywhere;
      word-break: normal;
    }

    @media (max-width: 850px) {
      nav {
        grid-template-columns: 1fr;
        position: static;
      }

      .hero-command-row {
        grid-template-columns: 1fr;
        align-items: start;
      }

      .hero-demo-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 390px;
      }

      .profile-card {
        grid-template-columns: 1fr;
      }

      .profile-photo-wrap {
        max-width: 190px;
      }

      header {
        padding: 32px 18px 24px;
      }

      main {
        padding: 14px;
      }
    }

    @media (max-width: 650px) {
      body { font-size: 0.95rem; }

      .terminal {
        width: calc(100% - 12px);
        margin: 6px auto;
      }
.demo-header { display: block; }
      main { padding: 10px; }
      .panel-content { padding: 12px; }

      details.panel > summary {
        padding: 14px 12px;
        font-size: 0.92rem;
      }

      .button,
      .download-button,
      .audio-download-button,
      .terminal-action-button,
      .floating-demo-button,
      .narration-button {
        font-size: 0.82rem;
        padding: 8px 10px;
      }

      .download-row,
      .audio-download-row,
      .hero-demo-actions {
        display: grid;
        grid-template-columns: 1fr;
      }

      .custom-audio-header { display: block; }
      .custom-audio-controls { grid-template-columns: 1fr; }
      .audio-time { text-align: left; }

      .topbar {
        flex-direction: column;
        align-items: flex-start;
      }

      header { padding: 24px 14px 20px; }
      .tagline { font-size: 0.98rem; }
      .copy-audio-row { display: block; }

      .skill-tip {
        position: static;
        opacity: 1;
        transform: none;
        margin-top: 6px;
        max-width: 100%;
        display: none;
      }

      .skill-tab-wrap:hover .skill-tip,
      .skill-tab-wrap:focus-within .skill-tip {
        display: block;
      }

      .side-tab {
        width: auto;
        min-width: 145px;
        height: 50px;
        padding: 0 14px;
        top: auto;
      }

      .audio-drawer-tab,
      .writing-drawer-tab {
        left: 12px;
      }

      .audio-drawer-tab { bottom: 76px; }
      .writing-drawer-tab { bottom: 14px; }

      .video-drawer-tab,
      .social-drawer-tab {
        right: 12px;
      }

      .video-drawer-tab { bottom: 76px; }
      .social-drawer-tab { bottom: 14px; }
      .floating-demo-button {
        bottom: 132px;
        width: min(220px, calc(100vw - 32px));
      }

.side-drawer {
        width: 100vw;
        padding: 14px;
      }
    }

/* Pure HTML/CSS Terran-style demo reel command module */
.terran-demo-console {
  width: min(470px, 42vw);
  min-width: 320px;
  position: relative;
  padding: 7px;
  border: 1px solid rgba(155, 231, 190, 0.42);
  background:
    linear-gradient(135deg, transparent 0 14px, rgba(35, 42, 42, 0.98) 14px calc(100% - 14px), transparent calc(100% - 14px)),
    linear-gradient(180deg, rgba(16, 22, 22, 0.98), rgba(2, 6, 7, 0.98));
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 18px);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.9),
    inset 0 0 18px rgba(57, 255, 136, 0.055),
    0 0 16px rgba(57, 255, 136, 0.12);
}

.terran-demo-console::before,
.terran-demo-console::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 8px;
  height: 8px;
  background: var(--amber);
  border: 1px solid rgba(255, 77, 109, 0.9);
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.85);
  pointer-events: none;
}

.terran-demo-console::before { left: 12px; }
.terran-demo-console::after { right: 12px; }

.terran-demo-main {
  position: relative;
  width: 100%;
  min-height: 74px;
  border: 1px solid rgba(57, 255, 136, 0.58);
  background:
    repeating-linear-gradient(to bottom, rgba(57, 255, 136, 0.055), rgba(57, 255, 136, 0.055) 1px, transparent 1px, transparent 5px),
    linear-gradient(90deg, rgba(2, 21, 17, 0.98), rgba(0, 7, 8, 0.98));
  color: #b8ffd1;
  font-family: inherit;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 14px);
  box-shadow:
    inset 0 0 16px rgba(57, 255, 136, 0.10),
    inset 0 0 0 1px rgba(0, 0, 0, 0.9);
}

.terran-demo-main:hover,
.terran-demo-main:focus {
  color: #eafff0;
  border-color: rgba(57, 255, 136, 0.95);
  box-shadow:
    inset 0 0 20px rgba(57, 255, 136, 0.18),
    0 0 18px rgba(57, 255, 136, 0.22);
}

.terran-play-cell {
  width: 58px;
  height: 52px;
  border: 1px solid rgba(57, 255, 136, 0.55);
  background: rgba(0, 0, 0, 0.34);
  display: grid;
  place-items: center;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
  box-shadow: inset 0 0 12px rgba(57, 255, 136, 0.12);
}

.terran-play-symbol {
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 23px solid var(--green);
  filter: drop-shadow(0 0 8px rgba(57, 255, 136, 0.85));
  margin-left: 5px;
}

.terran-pause-symbol {
  display: none;
  gap: 6px;
}

.terran-pause-symbol span {
  width: 8px;
  height: 29px;
  display: block;
  background: var(--green);
  box-shadow: 0 0 8px rgba(57, 255, 136, 0.85);
}

.terran-demo-console.is-playing .terran-play-symbol { display: none; }
.terran-demo-console.is-playing .terran-pause-symbol { display: flex; }

.terran-demo-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.terran-demo-label {
  color: var(--green);
  font-size: clamp(1rem, 2vw, 1.55rem);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(57, 255, 136, 0.7);
  white-space: nowrap;
}

.terran-demo-subline {
  color: var(--amber);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.terran-demo-subline::before {
  content: "/// ";
  color: var(--green);
}

.terran-demo-visualizer {
  height: 48px;
  border: 1px solid rgba(57, 255, 136, 0.45);
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 4px;
  padding: 8px 7px;
  background: rgba(0, 0, 0, 0.28);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}

.terran-demo-visualizer span {
  width: 6px;
  height: 14px;
  background: var(--green);
  box-shadow: 0 0 8px rgba(57, 255, 136, 0.65);
  opacity: 0.75;
}

.terran-demo-visualizer span:nth-child(2) { height: 24px; }
.terran-demo-visualizer span:nth-child(3) { height: 32px; }
.terran-demo-visualizer span:nth-child(4) { height: 19px; }
.terran-demo-visualizer span:nth-child(5) { height: 38px; }

.terran-demo-console.is-playing .terran-demo-visualizer span {
  animation: terranMeter 0.74s steps(4, end) infinite;
}
.terran-demo-console.is-playing .terran-demo-visualizer span:nth-child(2) { animation-duration: 0.48s; }
.terran-demo-console.is-playing .terran-demo-visualizer span:nth-child(3) { animation-duration: 0.62s; }
.terran-demo-console.is-playing .terran-demo-visualizer span:nth-child(4) { animation-duration: 0.53s; }
.terran-demo-console.is-playing .terran-demo-visualizer span:nth-child(5) { animation-duration: 0.69s; }

@keyframes terranMeter {
  0%, 100% { transform: scaleY(0.35); opacity: 0.58; }
  35% { transform: scaleY(1); opacity: 1; }
  70% { transform: scaleY(0.62); opacity: 0.76; }
}

.terran-demo-status-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 7px;
  align-items: center;
  margin-top: 7px;
}

.terran-mini-control {
  border: 1px solid rgba(57, 255, 136, 0.55);
  background: rgba(57, 255, 136, 0.05);
  color: var(--green);
  font-family: inherit;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-height: 28px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.terran-mini-control:hover,
.terran-mini-control:focus {
  background: var(--green);
  color: #001b0b;
  text-decoration: none;
}

.terran-stop-symbol {
  width: 8px;
  height: 8px;
  background: currentColor;
  display: inline-block;
}

.terran-demo-time {
  justify-self: end;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.terran-demo-progress {
  height: 8px;
  margin-top: 7px;
  border: 1px solid rgba(57, 255, 136, 0.4);
  background:
    repeating-linear-gradient(90deg, rgba(57, 255, 136, 0.14) 0 1px, transparent 1px 8px),
    rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.terran-demo-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  box-shadow: 0 0 10px rgba(57, 255, 136, 0.8);
}

@media (max-width: 850px) {
  .terran-demo-console {
    width: min(100%, 520px);
    min-width: 0;
  }
}

@media (max-width: 650px) {
  .terran-demo-main {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .terran-demo-visualizer {
    grid-column: 1 / -1;
    width: 100%;
    height: 38px;
  }

  .terran-demo-status-row {
    grid-template-columns: 1fr 1fr;
  }

  .terran-demo-time {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .terran-demo-label {
    white-space: normal;
  }

  .terran-demo-subline {
    white-space: normal;
  }
}


/* Patch: compact header demo module + restore readable intro text + stronger floating demo button */
.hero-command-row {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: center;
  gap: 16px;
}

.hero-demo-actions {
  min-width: 0;
  margin-bottom: 0;
}

.terran-demo-console {
  width: min(340px, 34vw);
  min-width: 280px;
  padding: 5px;
}

.terran-demo-main {
  min-height: 54px;
  grid-template-columns: 48px minmax(0, 1fr) 38px;
  gap: 8px;
  padding: 7px 9px;
}

.terran-play-cell {
  width: 40px;
  height: 38px;
}

.terran-play-symbol {
  border-top-width: 10px;
  border-bottom-width: 10px;
  border-left-width: 17px;
}

.terran-pause-symbol span {
  width: 6px;
  height: 21px;
}

.terran-demo-label {
  font-size: clamp(0.82rem, 1.35vw, 1.05rem);
  letter-spacing: 0.07em;
}

.terran-demo-subline {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
}

.terran-demo-visualizer {
  height: 36px;
  gap: 3px;
  padding: 6px 5px;
}

.terran-demo-visualizer span {
  width: 4px;
  height: 10px;
}

.terran-demo-visualizer span:nth-child(2) { height: 17px; }
.terran-demo-visualizer span:nth-child(3) { height: 24px; }
.terran-demo-visualizer span:nth-child(4) { height: 14px; }
.terran-demo-visualizer span:nth-child(5) { height: 28px; }

.terran-demo-status-row {
  margin-top: 5px;
  gap: 5px;
}

.terran-mini-control {
  min-height: 22px;
  padding: 3px 6px;
  font-size: 0.55rem;
}

.terran-demo-time {
  font-size: 0.58rem;
}

.terran-demo-progress {
  height: 6px;
  margin-top: 5px;
}

.copy-module {
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.tagline {
  max-width: 760px;
  min-height: 11.4em;
}

.terminal-typed-line {
  color: #d8ffe7;
}

.floating-demo-button {
  z-index: 250;
  bottom: 24px;
  border: 1px solid rgba(57, 255, 136, 0.85);
  background: rgba(0, 10, 8, 0.94);
  color: var(--green);
  box-shadow: 0 0 24px rgba(57, 255, 136, 0.28), inset 0 0 14px rgba(57, 255, 136, 0.1);
}

.floating-demo-button.visible {
  opacity: 0.96;
}

@media (max-width: 850px) {
  .hero-command-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .terran-demo-console {
    width: min(100%, 380px);
    min-width: 0;
  }
}

/* Mobile clarity patch: reduce hero density and keep archive controls out of the copy */
@media (max-width: 650px) {
  body {
    font-size: 0.88rem;
    padding-bottom: 92px;
  }

  .terminal {
    width: calc(100% - 8px);
    margin: 4px auto;
  }

  .topbar {
    padding: 7px 10px;
    gap: 4px;
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .live-signal {
    font-size: 0.68rem;
  }

  .system-notice {
    padding: 6px 10px;
    font-size: 0.58rem;
    letter-spacing: 0.055em;
  }

  .system-notice::before {
    display: none;
  }

  header {
    padding: 22px 12px 16px;
  }

  .kicker {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    line-height: 1.45;
    margin-bottom: 12px;
  }

  .hero-command-row {
    gap: 10px;
  }

  .hero-command-row .glitch-title {
    font-size: clamp(2rem, 12.5vw, 3.35rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
  }

  .hero-demo-actions.terran-demo-console,
  .terran-demo-console {
    max-width: 250px;
    justify-self: start;
    padding: 4px;
  }

  .terran-demo-main {
    min-height: 42px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 6px;
    padding: 6px 7px;
  }

  .terran-play-cell {
    width: 28px;
    height: 27px;
  }

  .terran-play-symbol {
    border-top-width: 7px;
    border-bottom-width: 7px;
    border-left-width: 12px;
    margin-left: 2px;
  }

  .terran-pause-symbol span {
    width: 4px;
    height: 15px;
  }

  .terran-demo-label {
    font-size: 0.72rem;
    letter-spacing: 0.055em;
  }

  .terran-demo-subline {
    display: none;
  }

  .terran-demo-visualizer {
    display: none;
  }

  .terran-demo-status-row {
    grid-template-columns: 1fr 1fr;
    margin-top: 4px;
    gap: 5px;
  }

  .terran-mini-control {
    min-height: 21px;
    padding: 3px 5px;
    font-size: 0.5rem;
  }

  .terran-demo-time {
    grid-column: 1 / -1;
    justify-self: start;
    font-size: 0.52rem;
  }

  .terran-demo-progress {
    height: 5px;
    margin-top: 4px;
  }

  .copy-module {
    margin-top: 14px;
  }

  .tagline {
    max-width: 100%;
    min-height: 0;
    font-size: 0.86rem;
    line-height: 1.42;
  }

  .terminal-typed-line {
    min-height: 1.25em;
  }

  nav {
    padding: 9px;
    gap: 7px;
  }

  nav a {
    padding: 8px;
    font-size: 0.74rem;
  }

  main {
    padding: 8px;
  }

  .panel-content {
    padding: 10px;
  }

  details.panel > summary {
    padding: 11px 10px;
    font-size: 0.78rem;
  }

  .profile-card {
    gap: 12px;
  }

  .profile-photo-wrap {
    max-width: 155px;
  }

  .mission-copy p {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .skill-tabs {
    gap: 7px;
  }

  .skill-tab {
    padding: 8px 9px;
    font-size: 0.78rem;
  }

  .side-tab {
    position: fixed;
    width: 78px;
    min-width: 0;
    height: 34px;
    padding: 0 6px;
    font-size: 0.55rem;
    line-height: 1.05;
    letter-spacing: 0.055em;
    opacity: 0.82;
    z-index: 220;
    clip-path: none;
    border-width: 1px;
    text-align: center;
  }

  .side-tab::before {
    inset: 4px;
  }

  .side-tab::after {
    display: none;
  }

  .audio-drawer-tab,
  .writing-drawer-tab {
    left: 8px;
  }

  .video-drawer-tab,
  .social-drawer-tab {
    right: 8px;
  }

  .audio-drawer-tab,
  .video-drawer-tab {
    bottom: 50px;
  }

  .writing-drawer-tab,
  .social-drawer-tab {
    bottom: 10px;
  }

  .tab-arrow {
    display: none;
  }

  .floating-demo-button {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: min(168px, calc(100vw - 190px));
    min-width: 130px;
    min-height: 34px;
    font-size: 0.62rem;
    padding: 7px 9px;
  }

  .floating-demo-button.visible {
    transform: translateX(-50%) translateY(0);
  }

  footer {
    padding: 14px 12px 102px;
    font-size: 0.68rem;
  }
}

@media (max-width: 390px) {
  .hero-demo-actions.terran-demo-console,
  .terran-demo-console {
    max-width: 230px;
  }

  .hero-command-row .glitch-title {
    font-size: clamp(1.8rem, 11.5vw, 3rem);
  }

  .side-tab {
    width: 70px;
    font-size: 0.5rem;
  }

  .floating-demo-button {
    width: 128px;
    font-size: 0.56rem;
  }
}


/* Final mobile declutter patch: compact hero player + clean bottom archive dock */
.terran-demo-progress {
  position: relative;
  cursor: pointer;
  touch-action: manipulation;
}

.terran-demo-progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  bottom: -10px;
}

@media (max-width: 650px) {
  body {
    padding-bottom: 74px;
  }

  header {
    padding: 18px 10px 14px;
  }

  .hero-command-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-command-row .glitch-title {
    font-size: clamp(1.85rem, 11vw, 3rem);
    line-height: 0.9;
    letter-spacing: -0.075em;
  }

  .hero-demo-actions.terran-demo-console,
  .terran-demo-console {
    width: min(100%, 300px) !important;
    max-width: 300px !important;
    min-width: 0 !important;
    justify-self: start;
    padding: 3px;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 12px);
  }

  .terran-demo-console::before,
  .terran-demo-console::after {
    width: 6px;
    height: 6px;
    top: 8px;
  }

  .terran-demo-main {
    min-height: 40px !important;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 6px;
    padding: 5px 7px;
  }

  .terran-play-cell {
    width: 26px !important;
    height: 25px !important;
  }

  .terran-play-symbol {
    border-top-width: 7px !important;
    border-bottom-width: 7px !important;
    border-left-width: 12px !important;
    margin-left: 2px;
  }

  .terran-pause-symbol span {
    width: 4px !important;
    height: 15px !important;
  }

  .terran-demo-label {
    font-size: 0.7rem !important;
    line-height: 1.1;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .terran-demo-subline,
  .terran-demo-visualizer {
    display: none !important;
  }

  .terran-demo-status-row {
    grid-template-columns: auto auto 1fr !important;
    margin-top: 3px;
    gap: 4px;
  }

  .terran-mini-control {
    min-height: 19px !important;
    padding: 2px 5px !important;
    font-size: 0.48rem !important;
    letter-spacing: 0.045em;
  }

  .terran-stop-symbol {
    width: 6px;
    height: 6px;
  }

  .terran-demo-time {
    grid-column: auto !important;
    justify-self: end !important;
    font-size: 0.48rem !important;
    letter-spacing: 0.035em;
  }

  .terran-demo-progress {
    height: 5px !important;
    margin-top: 4px !important;
  }

  .copy-module {
    margin-top: 12px;
  }

  .tagline {
    font-size: 0.78rem !important;
    line-height: 1.32 !important;
    min-height: 0 !important;
  }

  .terminal-typed-line {
    min-height: 1.1em;
  }

  .side-tab {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    width: 25vw !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 4px !important;
    font-size: 0.5rem !important;
    line-height: 1.05;
    letter-spacing: 0.035em;
    opacity: 0.94;
    z-index: 240;
    clip-path: none !important;
    border-width: 1px;
    background: rgba(0, 12, 8, 0.96);
    backdrop-filter: blur(3px);
    box-shadow: inset 0 0 12px rgba(57, 255, 136, 0.08), 0 -4px 18px rgba(0, 0, 0, 0.55);
    animation: none;
  }

  .side-tab::before,
  .side-tab::after {
    display: none !important;
  }

  .audio-drawer-tab { left: 0 !important; right: auto !important; }
  .writing-drawer-tab { left: 25vw !important; right: auto !important; }
  .video-drawer-tab { left: 50vw !important; right: auto !important; }
  .social-drawer-tab { left: 75vw !important; right: auto !important; }

  .tab-arrow {
    display: none !important;
  }



  body.drawer-open .side-tab,
  .side-tab.mobile-tabs-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(115%) !important;
    pointer-events: none !important;
  }

  body.drawer-open .floating-demo-button {
    opacity: 0 !important;
    transform: translateY(115%) !important;
    pointer-events: none !important;
  }

  .floating-demo-button {
    bottom: 50px !important;
    width: min(160px, calc(100vw - 24px));
    min-width: 0;
    min-height: 30px;
    font-size: 0.56rem;
    padding: 6px 8px;
  }

  footer {
    padding-bottom: 58px !important;
  }
}

@media (max-width: 390px) {
  .hero-demo-actions.terran-demo-console,
  .terran-demo-console {
    width: min(100%, 280px) !important;
    max-width: 280px !important;
  }

  .side-tab {
    font-size: 0.45rem !important;
  }
}


/* Desktop-only safety patch: keep the EXE title and demo console from overlapping. Mobile rules above remain unchanged. */
@media (min-width: 651px) {
  header {
    position: relative;
  }

  .hero-command-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 248px !important;
    align-items: end !important;
    gap: 14px !important;
  }

  .hero-command-row .glitch-title {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: clamp(2.35rem, 5.2vw, 4.15rem) !important;
    line-height: 0.95 !important;
    letter-spacing: -0.06em !important;
    white-space: nowrap !important;
  }

  .hero-demo-actions.terran-demo-console,
  .terran-demo-console {
    width: 248px !important;
    min-width: 0 !important;
    max-width: 248px !important;
    justify-self: end !important;
    align-self: end !important;
    padding: 4px !important;
  }

  .terran-demo-main {
    min-height: 42px !important;
    grid-template-columns: 34px minmax(0, 1fr) 30px !important;
    gap: 6px !important;
    padding: 5px 7px !important;
  }

  .terran-play-cell {
    width: 29px !important;
    height: 28px !important;
  }

  .terran-play-symbol {
    border-top-width: 7px !important;
    border-bottom-width: 7px !important;
    border-left-width: 12px !important;
  }

  .terran-pause-symbol span {
    width: 4px !important;
    height: 15px !important;
  }

  .terran-demo-label {
    font-size: 0.68rem !important;
    letter-spacing: 0.055em !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .terran-demo-subline {
    display: none !important;
  }

  .terran-demo-visualizer {
    height: 28px !important;
    gap: 2px !important;
    padding: 5px 4px !important;
  }

  .terran-demo-visualizer span {
    width: 3px !important;
  }

  .terran-demo-status-row {
    margin-top: 4px !important;
    gap: 4px !important;
    grid-template-columns: auto auto 1fr !important;
  }

  .terran-mini-control {
    min-height: 18px !important;
    padding: 2px 5px !important;
    font-size: 0.48rem !important;
  }

  .terran-demo-time {
    font-size: 0.5rem !important;
    justify-self: end !important;
  }

  .terran-demo-progress {
    height: 5px !important;
    margin-top: 4px !important;
  }
}

[hidden] {
  display: none !important;
}

.hidden {
  display: none !important;
}

.signal-game-modal {
  --signal-gold: #ffd966;
  --signal-cyan: #58fff0;
  --signal-green: #7cff7c;
  --signal-red: #ff5d5d;
  --signal-panel: rgba(0, 0, 0, 0.78);
  position: fixed;
  inset: 0;
  z-index: 600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #fff;
  font-family: "Courier New", Courier, monospace;
}

.signal-game-modal.open {
  display: flex;
}

.signal-game-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(88, 255, 240, 0.08), transparent 52%),
    rgba(0, 0, 0, 0.88);
}

.signal-game-crt-shell {
  position: relative;
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 2px solid rgba(255, 217, 102, 0.9);
  background:
    url("assets/rail-shooter/ui/crt-screen-overlay.png") center / cover no-repeat,
    linear-gradient(180deg, rgba(13, 12, 6, 0.96), rgba(0, 0, 0, 0.98));
  box-shadow:
    0 0 38px rgba(255, 217, 102, 0.22),
    inset 0 0 0 3px rgba(0, 0, 0, 0.86),
    inset 0 0 46px rgba(88, 255, 240, 0.08);
  padding: 18px;
}

.signal-game-bezel {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url("assets/rail-shooter/ui/crt-tv-frame.png") center / 100% 100% no-repeat;
  opacity: 0.56;
}

.signal-game-topbar,
#gameWrap {
  position: relative;
  z-index: 2;
}

.signal-game-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 217, 102, 0.48);
  padding-bottom: 10px;
}

.signal-game-kicker {
  margin: 0 0 4px;
  color: var(--signal-cyan);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signal-game-topbar h2 {
  margin: 0;
  color: var(--signal-gold);
  font-size: clamp(1.05rem, 2.6vw, 1.75rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.signal-game-close,
#gameWrap button,
#gameWrap .mailButton {
  border: 1px solid var(--signal-gold);
  background: #111;
  color: var(--signal-gold);
  font-family: inherit;
  font-weight: 700;
  padding: 10px 14px;
  text-decoration: none;
  text-transform: uppercase;
}

.signal-game-close:hover,
.signal-game-close:focus,
#gameWrap button:hover,
#gameWrap button:focus,
#gameWrap .mailButton:hover,
#gameWrap .mailButton:focus {
  background: var(--signal-gold);
  color: #000;
  text-decoration: none;
}

#gameWrap {
  width: min(980px, calc(100vw - 88px), calc((100vh - 150px) * 1020 / 745));
  height: auto;
  max-height: calc(100vh - 150px);
  margin: 0 auto 18px;
  aspect-ratio: 1020 / 745;
}

#gameWrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid var(--signal-gold);
  background: #02020b;
  image-rendering: pixelated;
}

#ui {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 4;
  display: none;
  color: #fff;
  font-size: 0.86rem;
  line-height: 1.45;
  pointer-events: none;
  text-shadow: 0 0 6px #000;
}

#missionText {
  max-width: 360px;
  margin-top: 8px;
  color: var(--signal-gold);
}

#questionPanel {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 5;
  display: none;
  width: min(92%, 760px);
  transform: translateX(-50%);
  border: 1px solid var(--signal-gold);
  background: var(--signal-panel);
  box-shadow: 0 0 18px rgba(255, 217, 102, 0.22);
  color: #fff;
  padding: 14px 18px;
  text-align: center;
}

#questionPanel.final-baron-question {
  bottom: 14px;
  width: min(94%, 780px);
  max-height: 46%;
  overflow-y: auto;
  border-color: var(--signal-red);
  box-shadow:
    0 0 24px rgba(255, 93, 93, 0.28),
    inset 0 0 22px rgba(255, 93, 93, 0.14);
}

#questionText {
  font-size: clamp(0.9rem, 2.1vw, 1.08rem);
  line-height: 1.4;
}

#questionTitle {
  margin-bottom: 8px;
  color: var(--signal-gold);
  font-weight: 700;
  text-transform: uppercase;
}

#answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-top: 10px;
  font-size: 0.82rem;
  text-align: left;
}

#gameWrap .answer {
  border: 1px solid rgba(255, 217, 102, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  padding: 6px 8px;
  text-align: left;
  text-transform: none;
}

#gameWrap .answer:hover,
#gameWrap .answer:focus {
  border-color: var(--signal-cyan);
  background: rgba(88, 255, 240, 0.12);
  color: #fff;
}

#gameWrap .answer.correct {
  border-color: var(--signal-green);
  background: rgba(124, 255, 124, 0.16);
}

#gameWrap .answer.wrong {
  border-color: var(--signal-red);
  background: rgba(255, 93, 93, 0.16);
}

#gameWrap .answer strong {
  color: var(--signal-cyan);
  margin-right: 8px;
}

.answer-hint {
  margin-top: 8px;
  color: #aaa;
  font-size: 0.76rem;
}

.boss-banner {
  position: absolute;
  left: 50%;
  top: 92px;
  z-index: 8;
  display: none;
  width: min(88%, 620px);
  transform: translateX(-50%);
  border: 2px solid var(--signal-red);
  background: rgba(0, 0, 0, 0.84);
  box-shadow:
    0 0 20px rgba(255, 93, 93, 0.38),
    inset 0 0 22px rgba(255, 93, 93, 0.18);
  color: var(--signal-red);
  font-size: clamp(1.5rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 14px 18px;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 93, 93, 0.7);
}

.boss-banner.show {
  display: block;
  animation: bossPulse 0.72s steps(2, end) infinite;
}

.choice-reaction-window {
  --reaction-accent: var(--signal-cyan);
  position: absolute;
  top: 78px;
  right: 18px;
  z-index: 9;
  width: clamp(150px, 22%, 230px);
  overflow: hidden;
  border: 1px solid var(--reaction-accent);
  background: #020507;
  box-shadow:
    0 0 20px color-mix(in srgb, var(--reaction-accent) 38%, transparent),
    inset 0 0 22px rgba(0, 0, 0, 0.78);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.choice-reaction-window.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.choice-reaction-window.correct {
  --reaction-accent: var(--signal-green);
}

.choice-reaction-window.incorrect {
  --reaction-accent: var(--signal-red);
}

.choice-reaction-chrome {
  display: flex;
  gap: 5px;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--reaction-accent) 52%, transparent);
  background: rgba(0, 0, 0, 0.76);
}

.choice-reaction-chrome span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--reaction-accent);
  box-shadow: 0 0 8px var(--reaction-accent);
}

.choice-reaction-window img,
.choice-reaction-window video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.choice-reaction-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  padding: 6px 8px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86) 34%);
  color: var(--reaction-accent);
  font-size: clamp(0.6rem, 1.4vw, 0.76rem);
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px #000;
  text-transform: uppercase;
  white-space: nowrap;
}

.side-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.15;
}

.tab-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1em;
}

.drawer-item {
  color: #dcf4ff !important;
  font-size: 0.98rem;
  line-height: 1.45;
  letter-spacing: 0.015em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.34);
}

.drawer-item span {
  color: #ffd87a !important;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.drawer-item:hover,
.drawer-item:focus,
.drawer-item.active {
  color: #02101f !important;
}

.drawer-item:hover span,
.drawer-item:focus span,
.drawer-item.active span {
  color: #3d2800 !important;
}

.drawer-now h3,
#drawer-video-title,
#drawer-audio-title {
  color: #e7fbff !important;
  line-height: 1.2;
}

.drawer-now p,
#drawer-video-project,
#drawer-audio-project {
  color: rgba(226, 244, 255, 0.88);
  line-height: 1.5;
}

.social-link-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  min-height: 100%;
  align-content: center;
  text-align: left;
  background:
    radial-gradient(circle at top, rgba(100, 210, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(11, 24, 36, 0.94), rgba(3, 8, 16, 0.98));
  color: #e7fbff;
}

.instagram-drawer-shell {
  max-width: min(100%, 640px);
  width: 100%;
  max-height: none;
}

.social-link-kicker {
  margin: 0;
  color: #ffd87a;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.social-link-card h3 {
  margin: 0;
  color: #f2fbff;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  line-height: 1.2;
  text-transform: uppercase;
}

.social-link-card p {
  margin: 0;
  color: rgba(226, 244, 255, 0.88);
  line-height: 1.55;
}

.social-link-button {
  justify-self: start;
}

@keyframes bossPulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.45);
  }
}

#overlay,
#landingScreen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.86);
  padding: 24px;
  overflow-y: auto;
  text-align: center;
}

#overlay h1,
#landingScreen h1 {
  margin: 0 0 12px;
  color: var(--signal-gold);
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#overlay p,
#landingScreen p {
  max-width: 720px;
  color: #ddd;
  line-height: 1.45;
}

.start-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 14px;
  max-width: 620px;
  margin: 14px auto;
  color: #f4f4f4;
  font-size: 0.9rem;
  line-height: 1.3;
  text-align: left;
}

#startBtn {
  display: block;
  width: min(100%, 340px);
  margin: 12px auto 0;
  box-shadow: 0 0 18px rgba(100, 210, 255, 0.3);
}

.practice-box {
  max-width: 660px;
  margin: 14px auto;
  border: 1px solid rgba(100, 210, 255, 0.52);
  border-radius: 8px;
  background: #000;
  box-shadow:
    inset 0 0 24px rgba(100, 210, 255, 0.08),
    0 0 18px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.practice-box-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(100, 210, 255, 0.26);
  background: rgba(4, 18, 32, 0.92);
  color: var(--signal-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  text-transform: uppercase;
}

#practiceCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 64 / 19;
  background: #000;
  outline: none;
}

#practiceCanvas:focus {
  box-shadow: inset 0 0 0 2px var(--signal-gold);
}

.practice-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(100, 210, 255, 0.22);
  background: rgba(5, 14, 28, 0.86);
}

.practice-controls button {
  width: 100%;
  min-height: 40px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  padding: 8px 10px;
}

.practice-controls button.is-active {
  border-color: rgba(255, 217, 102, 0.95);
  box-shadow: 0 0 14px rgba(255, 217, 102, 0.26);
}

@media (max-width: 760px) {
  .practice-controls {
    grid-template-columns: 1fr;
  }
}

.start-controls span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.start-controls kbd {
  display: inline-block;
  min-width: 2.1em;
  border: 1px solid rgba(255, 217, 102, 0.7);
  background: rgba(255, 217, 102, 0.1);
  color: var(--signal-gold);
  font-family: inherit;
  font-size: 0.8em;
  font-weight: 800;
  line-height: 1;
  padding: 5px 7px;
  text-align: center;
}

#landingScreen {
  display: none;
  background: rgba(0, 0, 0, 0.92);
  z-index: 12;
  padding: 14px;
  overflow: hidden;
}

#landingScreen > div {
  width: min(100%, 980px);
  max-height: 100%;
  overflow: auto;
  padding: 12px 12px 18px;
  box-sizing: border-box;
}

.signal-ending-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 16px;
}

.signal-ending-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.signal-ending-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(100%, 760px);
}

.signal-leaderboard-rail {
  display: flex;
  align-self: stretch;
}

#landingScreen h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(1.2rem, 3.2vw, 2.15rem);
  line-height: 1.14;
}

#landingScreen p {
  max-width: 56ch;
  margin: 0 auto;
  font-size: clamp(0.94rem, 1.7vw, 1.08rem);
  line-height: 1.5;
}

.landing-crt-visual {
  width: min(100%, 760px);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  margin: 4px auto 0;
  border: 1px solid var(--signal-gold);
  background:
    url("assets/rail-shooter/ui/crt-broadcast-placeholder.png") center / cover no-repeat,
    radial-gradient(circle at center, rgba(88, 255, 240, 0.12), transparent 58%),
    #03070a;
  box-shadow:
    0 0 22px rgba(88, 255, 240, 0.16),
    inset 0 0 30px rgba(0, 0, 0, 0.72);
}

#finalStats {
  width: min(100%, 760px);
  max-width: 100%;
  margin: 0 auto 8px;
  color: #ddd;
  line-height: 1.35;
}

.signal-run-highscores {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(125, 231, 255, 0.26);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(4, 14, 26, 0.92), rgba(2, 8, 18, 0.96));
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.34);
  text-align: left;
  box-sizing: border-box;
}

.signal-leaderboard-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-color: rgba(125, 231, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(6, 16, 30, 0.96), rgba(1, 6, 14, 0.98)),
    radial-gradient(circle at top, rgba(88, 255, 240, 0.08), transparent 52%);
  box-shadow:
    0 0 22px rgba(88, 255, 240, 0.1),
    inset 0 0 24px rgba(0, 0, 0, 0.48);
}

.signal-run-highscores-header {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.signal-run-highscores h2 {
  margin: 0;
  color: #7de7ff;
  font-family: "Share Tech Mono", "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-leaderboard-title {
  color: #f0fbff;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: clamp(0.75rem, 1.2vw, 0.92rem);
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-shadow:
    0 0 10px rgba(125, 231, 255, 0.24),
    0 0 2px rgba(255, 255, 255, 0.3);
}

#highScoreCurrentScore,
#highScoreStatus {
  margin: 0;
  color: #cfe8f5;
  font-size: 0.88rem;
  line-height: 1.4;
}

#highScoreForm label {
  display: block;
  margin-bottom: 6px;
  color: #ffd966;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-run-highscore-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 8px;
}

#highScoreName {
  min-width: 0;
  border: 1px solid rgba(125, 231, 255, 0.36);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
  color: #f6fdff;
  font: inherit;
  padding: 10px 12px;
  text-transform: uppercase;
}

#highScoreName:focus {
  outline: none;
  border-color: rgba(255, 217, 102, 0.88);
  box-shadow: 0 0 0 2px rgba(255, 217, 102, 0.18);
}

#highScoreSubmit {
  min-height: 42px;
  white-space: nowrap;
}

#highScoreStatus[data-tone="error"] {
  color: #ff9eaa;
}

#highScoreStatus[data-tone="success"] {
  color: #8effc7;
}

#highScoreList {
  margin: 10px 0 0;
  padding-left: 0;
  color: #edf8ff;
  list-style: none;
}

#highScoreList li {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
}

.signal-leaderboard-row {
  min-height: 30px;
  border-bottom: 1px solid rgba(125, 231, 255, 0.08);
}

.signal-leaderboard-row:last-child {
  border-bottom: 0;
}

.signal-leaderboard-row-empty {
  display: block;
  padding: 8px 0 4px;
  color: rgba(237, 248, 255, 0.72);
  text-align: center;
}

#highScoreList .score-badge {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  padding: 2px 6px;
  border: 1px solid rgba(125, 231, 255, 0.2);
  border-radius: 999px;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.signal-leaderboard-badge {
  justify-content: center;
  min-width: 78px;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.5rem;
  line-height: 1.5;
}

.signal-leaderboard-icon {
  display: inline-block;
  flex: 0 0 auto;
}

.signal-leaderboard-icon-ship {
  width: 30px;
  height: 18px;
  background-image: url("assets/rail-shooter/ships/rail-gun-ship-sheet.png");
  background-repeat: no-repeat;
  background-size: 300% 400%;
  background-position: 0 0;
  image-rendering: pixelated;
  filter:
    drop-shadow(0 0 4px rgba(255, 122, 122, 0.32))
    saturate(1.05);
}

.signal-leaderboard-icon-easy-boss {
  width: 28px;
  height: 20px;
  background-image: url("assets/rail-shooter/sprites/Easy-Mode-Boss.png");
  background-repeat: no-repeat;
  background-size: 300% 200%;
  background-position: 0 0;
  image-rendering: pixelated;
  filter:
    drop-shadow(0 0 4px rgba(159, 220, 255, 0.3))
    saturate(1.04);
}

#highScoreList .score-rank {
  color: #ffd966;
}

.signal-leaderboard-rank {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.62rem;
}

#highScoreList .score-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-leaderboard-name {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.62rem;
  line-height: 1.5;
}

#highScoreList .score-name.easy-pilot,
#highScoreList .score-badge.easy-pilot {
  color: #9fdcff;
}

#highScoreList .score-badge.easy-pilot {
  border-color: rgba(159, 220, 255, 0.34);
  background: rgba(159, 220, 255, 0.08);
}

#highScoreList .score-name.rock-smasher,
#highScoreList .score-badge.rock-smasher {
  color: #ff7a7a;
}

#highScoreList .score-badge.rock-smasher {
  border-color: rgba(255, 122, 122, 0.34);
  background: rgba(255, 122, 122, 0.08);
}

#highScoreList .score-name.ace-pilot,
#highScoreList .score-badge.ace-pilot {
  color: #ffd966;
}

#highScoreList .score-badge.ace-pilot {
  border-color: rgba(255, 217, 102, 0.4);
  background: rgba(255, 217, 102, 0.1);
}

#highScoreList .score-value {
  color: #7de7ff;
  font-variant-numeric: tabular-nums;
}

.signal-leaderboard-score {
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.ending-video {
  display: none;
  width: min(100%, 620px);
  max-width: 100%;
  aspect-ratio: 16 / 9;
  margin: 4px auto 8px;
  border: 1px solid var(--signal-red);
  background: #000;
  box-shadow:
    0 0 22px rgba(255, 93, 93, 0.2),
    inset 0 0 30px rgba(0, 0, 0, 0.72);
}

#landingScreen.bad-ending .landing-crt-visual {
  display: none;
}

#landingScreen.bad-ending .ending-video {
  display: block;
}

#instructions {
  position: absolute;
  left: 50%;
  bottom: -34px;
  display: none;
  width: 100%;
  transform: translateX(-50%);
  color: #aaa;
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 760px) {
  .signal-ending-layout {
    grid-template-columns: 1fr;
  }

  .signal-leaderboard-rail {
    width: min(100%, 560px);
    justify-self: center;
  }

  .signal-run-highscores-header,
  .signal-run-highscore-form-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .signal-run-highscores-header {
    align-items: start;
  }

  #highScoreSubmit {
    width: 100%;
  }

  .signal-game-modal {
    padding: 10px;
  }

  .signal-game-crt-shell {
    width: calc(100vw - 20px);
    padding: 12px;
  }

  .signal-game-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .signal-game-close {
    align-self: flex-end;
  }

  #ui {
    font-size: 0.68rem;
  }

  #missionText {
    max-width: 220px;
  }

  #questionPanel {
    bottom: 10px;
    padding: 10px;
  }

  .choice-reaction-window {
    top: 72px;
    right: 10px;
    width: clamp(128px, 34%, 172px);
  }

  #answers {
    grid-template-columns: 1fr;
    font-size: 0.68rem;
  }

  #instructions {
    bottom: -46px;
    font-size: 0.68rem;
  }

  .start-controls {
    grid-template-columns: 1fr;
    max-width: 330px;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #gameWrap canvas {
    filter: none;
  }
}
/* ==========================================================
   Daves Atari OS Update
   ========================================================== */

:root {
  --xp-blue: #1d72ff;
  --xp-blue-deep: #0637a8;
  --xp-blue-light: #8fd8ff;
  --xp-cyan: #64d2ff;
  --xp-violet: #7a5cff;
  --xp-glass: rgba(29, 114, 255, 0.16);
  --xp-glass-strong: rgba(100, 210, 255, 0.22);
  --xp-shadow: rgba(29, 114, 255, 0.42);
  --xp-inner-dark: rgba(0, 10, 22, 0.78);
  --xp-white-edge: rgba(235, 250, 255, 0.38);
}

/* A TOUCH UP. */
.terminal {
  border-color: rgba(100, 210, 255, 0.82);
  border-radius: 10px 10px 4px 4px;
  background:
    linear-gradient(180deg, rgba(7, 20, 35, 0.96), rgba(2, 8, 8, 0.93)),
    radial-gradient(circle at 20% 0%, rgba(100, 210, 255, 0.12), transparent 32%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 32px rgba(100, 210, 255, 0.22),
    0 0 62px rgba(29, 114, 255, 0.12),
    inset 0 1px 0 var(--xp-white-edge),
    inset 0 0 38px rgba(57, 255, 136, 0.05);
}

.terminal::before {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(143, 216, 255, 0.22);
  border-radius: 7px 7px 3px 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.65);
  z-index: 1;
}

.terminal > * {
  position: relative;
  z-index: 2;
}

/* Smexy blue barss. */
.topbar {
  border-bottom-color: rgba(143, 216, 255, 0.72);
  border-radius: 7px 7px 0 0;
  background:
    linear-gradient(180deg, rgba(143, 216, 255, 0.35) 0%, rgba(29, 114, 255, 0.28) 18%, rgba(6, 55, 168, 0.34) 58%, rgba(3, 18, 58, 0.38) 100%),
    linear-gradient(90deg, rgba(57, 255, 136, 0.14), rgba(100, 210, 255, 0.14), rgba(122, 92, 255, 0.1));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(0, 0, 0, 0.72),
    0 0 18px rgba(29, 114, 255, 0.18);
}

/* Header and nav get softer sci-fi bevels instead of plain divider lines. */
header,
nav,
footer,
.marquee {
  border-color: rgba(100, 210, 255, 0.58) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.65);
}

header {
  background:
    radial-gradient(circle at 18% 0%, rgba(100, 210, 255, 0.14), transparent 28%),
    linear-gradient(rgba(57, 255, 136, 0.045), transparent),
    repeating-linear-gradient(
      90deg,
      rgba(100, 210, 255, 0.055),
      rgba(100, 210, 255, 0.055) 1px,
      transparent 1px,
      transparent 90px
    );
}

nav {
  background:
    linear-gradient(180deg, rgba(143, 216, 255, 0.1), rgba(7, 17, 18, 0.9)),
    rgba(7, 17, 18, 0.88);
}

nav a,
.button,
.download-button,
.audio-download-button,
.terminal-action-button,
.narration-button,
.audio-control-button,
.floating-demo-button,
.drawer-close,
.terran-mini-control {
  border-color: rgba(143, 216, 255, 0.74) !important;
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(29, 114, 255, 0.16), rgba(0, 12, 20, 0.42));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.72),
    0 0 12px rgba(100, 210, 255, 0.12);
}

nav a:hover,
nav a:focus,
.button:hover,
.button:focus,
.download-button:hover,
.download-button:focus,
.audio-download-button:hover,
.audio-download-button:focus,
.terminal-action-button:hover,
.terminal-action-button:focus,
.terminal-action-button.is-playing,
.narration-button:hover,
.narration-button:focus,
.audio-control-button:hover,
.audio-control-button:focus,
.floating-demo-button:hover,
.floating-demo-button:focus,
.floating-demo-button.is-playing,
.drawer-close:hover,
.drawer-close:focus,
.terran-mini-control:hover,
.terran-mini-control:focus {
  color: #001227;
  background:
    linear-gradient(180deg, #dff7ff 0%, #8fd8ff 24%, #1d72ff 62%, #0637a8 100%);
  border-color: rgba(235, 250, 255, 0.88) !important;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.62),
    0 0 18px rgba(100, 210, 255, 0.42);
}

/* Panels keep their current shape, but their edges now read as sci-fi XP windows. */
.panel,
.custom-audio-player,
.profile-photo-wrap,
.profile-photo-frame,
.writing-card,
.drawer-now,
.drawer-player,
.audio-link-archive,
.writing-archive,
.terran-demo-console {
  border-color: rgba(100, 210, 255, 0.68) !important;
  border-radius: 7px;
  background-image:
    linear-gradient(180deg, rgba(143, 216, 255, 0.07), transparent 36%),
    linear-gradient(180deg, rgba(11, 24, 36, 0.96), rgba(3, 8, 9, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.72),
    0 0 18px rgba(29, 114, 255, 0.12),
    inset 0 0 22px rgba(57, 255, 136, 0.035);
}

.panel,
.custom-audio-player,
.writing-card,
.drawer-now,
.drawer-player,
.terran-demo-console {
  position: relative;
}

.panel::before,
.custom-audio-player::before,
.writing-card::before,
.drawer-now::before,
.drawer-player::before,
.terran-demo-console::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(235, 250, 255, 0.54), transparent);
  box-shadow: 0 0 10px rgba(100, 210, 255, 0.42);
}

/* Details summary becomes a slim XP-style title strip. */
details.panel > summary,
.drawer-header {
  border-bottom-color: rgba(143, 216, 255, 0.42) !important;
  background:
    linear-gradient(180deg, rgba(143, 216, 255, 0.13), rgba(29, 114, 255, 0.07)),
    linear-gradient(90deg, rgba(100, 210, 255, 0.1), transparent 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.54);
}

/* Side drawer tabs: same placement, more Windows-XP-meets-airlock. */
.side-tab {
  border-color: rgba(143, 216, 255, 0.78) !important;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(210, 245, 255, 0.18), rgba(29, 114, 255, 0.18) 36%, rgba(0, 18, 38, 0.74)),
    linear-gradient(90deg, rgba(57, 255, 136, 0.08), rgba(122, 92, 255, 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.75),
    0 0 18px rgba(29, 114, 255, 0.22),
    0 0 32px rgba(57, 255, 136, 0.08);
}

.side-tab::before {
  border-color: rgba(235, 250, 255, 0.16);
  border-style: solid;
}

.side-tab::after {
  border-color: rgba(100, 210, 255, 0.14);
  box-shadow: 0 0 12px rgba(100, 210, 255, 0.16);
}

.side-tab:hover,
.side-tab:focus {
  color: #001227;
  background:
    linear-gradient(180deg, #e9fbff, #8fd8ff 28%, #1d72ff 68%, #0637a8);
}

/* Drawer windows: same drawers, more glassy sci-fi OS chrome. */
.side-drawer {
  border-color: rgba(143, 216, 255, 0.82) !important;
  background:
    radial-gradient(circle at top, rgba(100, 210, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(5, 20, 35, 0.98), rgba(0, 4, 8, 0.98)),
    repeating-linear-gradient(
      to bottom,
      rgba(100, 210, 255, 0.04) 0px,
      rgba(100, 210, 255, 0.04) 1px,
      transparent 1px,
      transparent 5px
    );
  box-shadow:
    0 0 38px rgba(0, 0, 0, 0.72),
    0 0 30px rgba(29, 114, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 24px rgba(57, 255, 136, 0.045);
}

.drawer-item,
.skill-tab,
.top-link {
  border-color: rgba(143, 216, 255, 0.62) !important;
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(29, 114, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.64),
    0 0 10px rgba(100, 210, 255, 0.1);
}

.drawer-item:hover,
.drawer-item:focus,
.drawer-item.active,
.skill-tab:hover,
.skill-tab:focus,
.skill-tab.pressed,
.top-link:hover,
.top-link:focus {
  color: #001227;
  background:
    linear-gradient(180deg, #dff7ff 0%, #8fd8ff 26%, #1d72ff 68%, #0637a8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(0, 0, 0, 0.68),
    0 0 16px rgba(100, 210, 255, 0.34);
}

/* Audio/progress lines get a subtle glass-channel look. */
.audio-progress-shell,
.terran-demo-progress {
  border-color: rgba(143, 216, 255, 0.66) !important;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.26)),
    repeating-linear-gradient(
      90deg,
      rgba(100, 210, 255, 0.14) 0px,
      rgba(100, 210, 255, 0.14) 1px,
      transparent 1px,
      transparent 8px
    ),
    rgba(0, 0, 0, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.78),
    0 0 12px rgba(29, 114, 255, 0.16);
}

.audio-progress-fill,
.terran-demo-progress span {
  background: linear-gradient(90deg, var(--green), var(--xp-cyan), var(--xp-blue));
  box-shadow: 0 0 12px rgba(100, 210, 255, 0.72);
}

/* Keep mobile clean: reduce glow density on small screens. */
@media (max-width: 650px) {
  .terminal,
  .panel,
  .side-drawer,
  .side-tab {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 14px rgba(29, 114, 255, 0.14);
  }

  .terminal::before {
    inset: 3px;
  }
}
/* ==========================================================
   TV OVERLAY
   ========================================================== */

:root {
  --game-xp-blue: #1d72ff;
  --game-xp-blue-deep: #0637a8;
  --game-xp-cyan: #64d2ff;
  --game-xp-light: #8fd8ff;
  --game-xp-green: #39ff88;
  --game-xp-gold: #ffd166;
  --game-xp-red: #ff4d6d;
  --game-xp-glass: rgba(4, 18, 32, 0.92);
  --game-xp-edge: rgba(235, 250, 255, 0.42);
}

/* Outer modal shell: match the restored XP sci-fi chrome */
.signal-game-crt-shell {
  border-color: rgba(143, 216, 255, 0.84) !important;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(100, 210, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(5, 20, 36, 0.98), rgba(0, 4, 10, 0.98));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 36px rgba(29, 114, 255, 0.28),
    0 0 70px rgba(57, 255, 136, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(0, 0, 0, 0.78),
    inset 0 0 48px rgba(100, 210, 255, 0.08);
}

/* Existing bezel stays, but becomes a subtle glass layer instead of a gold-heavy arcade frame */
.signal-game-bezel {
  opacity: 0.34;
  mix-blend-mode: screen;
}

/* Topbar: XP title-bar energy */
.signal-game-topbar {
  align-items: center;
  border-bottom-color: rgba(143, 216, 255, 0.52) !important;
  border-radius: 8px 8px 0 0;
  padding: 10px 6px 12px;
  background:
    linear-gradient(180deg, rgba(143, 216, 255, 0.22), rgba(29, 114, 255, 0.13) 48%, rgba(3, 18, 58, 0.26)),
    linear-gradient(90deg, rgba(57, 255, 136, 0.08), rgba(100, 210, 255, 0.12), rgba(122, 92, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(0, 0, 0, 0.72),
    0 0 16px rgba(29, 114, 255, 0.18);
}

.signal-game-kicker {
  color: var(--game-xp-cyan);
}

.signal-game-topbar h2 {
  color: var(--game-xp-green);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.72),
    0 0 9px rgba(57, 255, 136, 0.42);
}

/* Close/start/retry/answer buttons: same chrome as the main portfolio buttons */
.signal-game-close,
#gameWrap button,
#gameWrap .mailButton {
  border-color: rgba(143, 216, 255, 0.78) !important;
  border-radius: 6px;
  color: var(--game-xp-light);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 42%),
    linear-gradient(180deg, rgba(29, 114, 255, 0.18), rgba(0, 12, 28, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.75),
    0 0 12px rgba(100, 210, 255, 0.16);
}

.signal-game-close:hover,
.signal-game-close:focus,
#gameWrap button:hover,
#gameWrap button:focus,
#gameWrap .mailButton:hover,
#gameWrap .mailButton:focus {
  color: #001227;
  background:
    linear-gradient(180deg, #e9fbff 0%, #8fd8ff 28%, #1d72ff 68%, #0637a8 100%);
  border-color: rgba(235, 250, 255, 0.92) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(0, 0, 0, 0.68),
    0 0 18px rgba(100, 210, 255, 0.42);
}

/* Main game TV frame */
#gameWrap {
  position: relative;
  border-radius: 18px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 16%),
    linear-gradient(180deg, rgba(29, 114, 255, 0.22), rgba(0, 5, 15, 0.94));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 28px rgba(29, 114, 255, 0.28),
    0 0 56px rgba(57, 255, 136, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    inset 0 -3px 0 rgba(0, 0, 0, 0.82),
    inset 2px 0 0 rgba(143, 216, 255, 0.18),
    inset -2px 0 0 rgba(0, 0, 0, 0.58);
}

/* Canvas becomes the actual beveled TV glass */
#gameWrap canvas {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 12px;
  background: #02020b;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.95),
    inset 0 0 0 4px rgba(143, 216, 255, 0.26),
    inset 0 0 34px rgba(0, 0, 0, 0.82),
    0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 18px rgba(100, 210, 255, 0.16);
}

/* Beveled TV glass overlay over the main game */
#gameWrap::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 8;
  pointer-events: none;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.38)),
    radial-gradient(circle at 50% 38%, transparent 46%, rgba(0, 0, 0, 0.28) 100%),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.045) 0px,
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px,
      transparent 4px
    );
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.26),
    inset 0 -3px 0 rgba(0, 0, 0, 0.72),
    inset 2px 0 0 rgba(143, 216, 255, 0.14),
    inset -2px 0 0 rgba(0, 0, 0, 0.52);
  mix-blend-mode: screen;
}

/* Curved CRT shadow/vignette, separate from the scanline layer */
#gameWrap::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 9;
  pointer-events: none;
  border-radius: 12px;
  background:
    radial-gradient(circle at center, transparent 58%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent 18%, rgba(0, 0, 0, 0.18) 100%);
  box-shadow:
    inset 0 0 34px rgba(0, 0, 0, 0.74),
    inset 0 0 70px rgba(0, 0, 0, 0.42);
}

/* Keep actual overlays readable above the glass when needed */
#overlay,
#landingScreen,
#questionPanel,
.choice-reaction-window,
#instructions {
  z-index: 12;
}

/* HUD chips: make game info look like part of the XP broadcast OS */
#ui {
  position: absolute;
  z-index: 13;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: var(--game-xp-green);
  font-size: 0.72rem;
  text-shadow: 0 0 8px rgba(57, 255, 136, 0.45);
}

#ui span,
#missionText {
  border: 1px solid rgba(143, 216, 255, 0.42);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    rgba(0, 12, 24, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.66),
    0 0 10px rgba(100, 210, 255, 0.12);
  padding: 4px 8px;
}

#missionText {
  max-width: min(380px, 100%);
  color: var(--game-xp-cyan);
}

/* Question panel as a transmission interrupt card */
#questionPanel {
  border-color: rgba(143, 216, 255, 0.72) !important;
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(100, 210, 255, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(4, 18, 32, 0.96), rgba(0, 5, 12, 0.96));
  box-shadow:
    0 0 28px rgba(29, 114, 255, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.74);
}

#questionTitle {
  color: var(--game-xp-cyan);
  text-shadow: 0 0 8px rgba(100, 210, 255, 0.45);
}

#answers button.correct {
  border-color: rgba(57, 255, 136, 0.86) !important;
  background:
    linear-gradient(180deg, rgba(214, 255, 231, 0.92), rgba(57, 255, 136, 0.78));
  color: #001b0b;
}

#answers button.wrong {
  border-color: rgba(255, 77, 109, 0.86) !important;
  background:
    linear-gradient(180deg, rgba(255, 205, 215, 0.92), rgba(255, 77, 109, 0.82));
  color: #27000a;
}

/* Attract/ending visual should use the same TV glass language */
.landing-crt-visual,
.ending-video {
  border: 0;
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.95),
    inset 0 0 0 4px rgba(143, 216, 255, 0.22),
    inset 0 0 34px rgba(0, 0, 0, 0.82),
    0 0 24px rgba(29, 114, 255, 0.22);
}

/* Mobile: reduce frame bulk but keep the TV feel */
@media (max-width: 760px) {
  .signal-game-crt-shell {
    padding: 10px;
    border-radius: 10px;
  }

  #gameWrap {
    padding: 6px;
    border-radius: 12px;
  }

  #gameWrap::before,
  #gameWrap::after {
    inset: 6px;
    border-radius: 8px;
  }

  #gameWrap canvas {
    border-radius: 8px;
  }

  #ui {
    top: 9px;
    left: 9px;
    right: 9px;
    gap: 5px;
    font-size: 0.62rem;
  }

  #ui span,
  #missionText {
    padding: 3px 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #gameWrap::before {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.28)),
      radial-gradient(circle at 50% 38%, transparent 46%, rgba(0, 0, 0, 0.24) 100%);
  }
}
/* ==========================================================
   MINI GAME HUD + TITLE CLEANUP
   ========================================================== */

:root {
  --game-retro-font: "Press Start 2P", "Courier New", monospace;
  --game-question-font: "Share Tech Mono", "Courier New", monospace;
  --game-answer-font: "VT323", "Courier New", monospace;
}

/* ---------- HUD ---------- */

#ui {
  position: absolute;
  z-index: 14;
  top: 10px;
  left: 10px;
  right: 10px;

  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;

  font-family: var(--game-retro-font);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.02em;

  color: #57ff9a;
  text-shadow: 0 0 6px rgba(87, 255, 154, 0.45);
}

#ui > div,
#ui > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 28px;
  padding: 6px 10px;

  border-radius: 999px;
  border: 1px solid rgba(120, 215, 255, 0.55);

  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), transparent 40%),
    rgba(0, 15, 28, 0.82);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.72),
    0 0 10px rgba(80, 180, 255, 0.14);

  white-space: nowrap;
}

/* Mission text becomes its own cleaner chip underneath */
#missionText {
  display: block;
  flex: 0 0 100%;
  margin-top: 4px;
  max-width: 420px;
  padding: 7px 12px;

  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.25;

  color: #9fe4ff;
  text-shadow: 0 0 6px rgba(100, 210, 255, 0.35);
}

/* ---------- TITLE SCREEN ---------- */

/* Hide the extra upper label line if present */
.signal-game-kicker,
.arcade-mission-kicker,
.landing-kicker,
#landingScreen .eyebrow,
#landingScreen .kicker,
#landingScreen .subtitle {
  display: none !important;
}

/* Main title only */
#landingScreen h1,
#overlay h1,
.signal-game-topbar h2 {
  font-family: var(--game-retro-font);
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;

  color: #57ff57;
  text-shadow:
    0 0 6px rgba(87, 255, 87, 0.35),
    0 0 14px rgba(87, 255, 87, 0.22);
}

/* Clean the title card panel */
#landingScreen > div,
#overlay > div {
  text-align: center;
}

#landingScreen p,
#overlay p {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile cleanup */
@media (max-width: 760px) {
  #ui {
    gap: 6px;
    font-size: 8px;
  }

  #ui > div,
  #ui > span {
    min-height: 24px;
    padding: 5px 8px;
  }

  #missionText {
    font-size: 11px;
    max-width: 100%;
  }

  #landingScreen h1,
  #overlay h1,
  .signal-game-topbar h2 {
    font-size: clamp(18px, 6vw, 28px);
  }
}

/* ==========================================================
   MINI GAME CRT TV BEVEL + HUD CLEANUP
   ========================================================== */

#missionText {
  display: none !important;
}

.signal-game-kicker {
  display: none !important;
}

.signal-game-topbar {
  align-items: center;
}

.signal-game-topbar > div {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
}

.signal-game-topbar h2,
#landingScreen h1,
#overlay h1 {
  font-family: "Press Start 2P", "Courier New", monospace;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  color: #e9fff8;
  text-shadow:
    0 0 8px rgba(135, 235, 255, 0.42),
    0 0 20px rgba(71, 168, 255, 0.22);
}

.signal-game-topbar h2 {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 30px);
}

#gameWrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  padding: 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), transparent 16%),
    linear-gradient(180deg, rgba(29,114,255,0.22), rgba(0,5,15,0.96));
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 28px rgba(29,114,255,0.28),
    inset 0 2px 0 rgba(255,255,255,0.30),
    inset 0 -3px 0 rgba(0,0,0,0.82),
    inset 2px 0 0 rgba(143,216,255,0.18),
    inset -2px 0 0 rgba(0,0,0,0.58);
}

#gameWrap canvas {
  position: relative;
  z-index: 1;
  display: block;
  border-radius: 11px;
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.95),
    inset 0 0 0 4px rgba(143,216,255,0.22),
    inset 0 0 34px rgba(0,0,0,0.82),
    0 1px 0 rgba(255,255,255,0.22),
    0 0 18px rgba(100,210,255,0.16);
}

#gameWrap::before {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 5;
  pointer-events: none;
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 18%, transparent 72%, rgba(0,0,0,0.32)),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.045) 0px,
      rgba(255,255,255,0.045) 1px,
      transparent 1px,
      transparent 4px
    );
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.22),
    inset 0 -3px 0 rgba(0,0,0,0.68),
    inset 2px 0 0 rgba(143,216,255,0.12),
    inset -2px 0 0 rgba(0,0,0,0.48);
  mix-blend-mode: screen;
}

#gameWrap::after {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 6;
  pointer-events: none;
  border-radius: 11px;
  background:
    radial-gradient(circle at center, transparent 58%, rgba(0,0,0,0.56) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 18%, rgba(0,0,0,0.16) 100%);
  box-shadow:
    inset 0 0 34px rgba(0,0,0,0.70),
    inset 0 0 70px rgba(0,0,0,0.38);
}

#overlay,
#landingScreen,
#questionPanel,
#bossBanner,
.choice-reaction-window,
#instructions {
  z-index: 14;
}

@media (max-width: 760px) {
  .signal-game-topbar h2,
  #landingScreen h1,
  #overlay h1 {
    font-size: clamp(18px, 5.4vw, 26px);
  }

  #gameWrap {
    padding: 8px;
    border-radius: 14px;
  }

  #gameWrap::before,
  #gameWrap::after {
    inset: 8px;
    border-radius: 10px;
  }
}

/* Intern In The Stars: readable quiz panel + boss-visible layout */

#questionPanel {
  bottom: 14px;
  width: min(720px, 78%);
  max-width: 720px;
  max-height: 40%;
  padding: 12px 16px;
  overflow-y: auto;
  text-align: left;
}

#questionPanel.static-baron-question,
#questionPanel.final-baron-question {
  bottom: 14px;
  width: min(740px, 80%);
  max-width: 740px;
  max-height: 40%;
  padding: 12px 16px;
  overflow-y: auto;
}

/* Keep the game title retro, but make quiz reading easier */
#signalGameTitle,
#overlay h1,
#landingScreen h1 {
  font-family: "Press Start 2P", monospace;
}

/* Keep the victory screen compact enough to reveal stats + leaderboard in one view */
#landingScreen > div {
  width: min(100%, 940px);
  padding: 8px 10px 14px;
}

.signal-ending-layout {
  grid-template-columns: minmax(0, 1fr) 264px;
  gap: 12px;
}

#landingScreen h1 {
  max-width: 11ch;
  font-size: clamp(16px, 3.2vw, 28px);
  line-height: 1.04;
}

#landingScreen p {
  max-width: 52ch;
  font-size: clamp(0.88rem, 1.45vw, 1rem);
  line-height: 1.38;
}

.landing-crt-visual,
.ending-video {
  width: min(100%, 560px);
  margin: 2px auto 6px;
}

#finalStats {
  width: min(100%, 560px);
}

.signal-run-highscores {
  padding: 10px 12px;
}

#highScoreList {
  margin-top: 8px;
}

@media (max-width: 860px) {
  #landingScreen > div {
    width: min(100%, 640px);
  }

  .signal-ending-layout {
    grid-template-columns: 1fr;
  }

  .signal-leaderboard-rail {
    width: min(100%, 560px);
    justify-self: center;
  }
}

#questionTitle {
  font-family: "Share Tech Mono", "Segoe UI", system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  color: #7de7ff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.9),
    0 0 8px rgba(100, 210, 255, 0.45);
}

#questionText {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  max-width: 62ch;
  color: #f1fbff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.95),
    0 0 6px rgba(0, 0, 0, 0.8);
}

#answers {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 9px;
}

#gameWrap .answer {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0.01em;
  padding: 7px 10px;
  color: #f7fbff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.95),
    0 0 5px rgba(0, 0, 0, 0.8);
}

#gameWrap .answer strong {
  font-family: "Share Tech Mono", monospace;
  font-size: 17px;
  color: #57fff0;
  margin-right: 8px;
}

.answer-hint {
  margin-top: 7px;
  font-family: "Share Tech Mono", monospace;
  font-size: 13px;
  line-height: 1.2;
  color: rgba(235, 248, 255, 0.72);
}

/* Signal Run gameplay readability pass */
#ui {
  top: 12px;
  left: 12px;
  right: 12px;
  gap: 6px;
  max-width: min(620px, calc(100% - 24px));
  align-items: flex-start;
}

#ui .hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 5px 9px;
  font-size: 9px;
}

#ui .hud-chip-run {
  gap: 10px;
}

#ui .hud-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#ui .hud-chip-signal {
  color: #8ae6ff;
}

#questionPanel {
  left: 50%;
  right: auto;
  bottom: 18px;
  width: min(720px, 85%);
  max-width: 720px;
  padding: 16px 18px;
  transform: translateX(-50%);
  text-align: left;
}

#questionPanel.final-baron-question,
#questionPanel.static-baron-question {
  bottom: 18px;
  left: 50%;
  right: auto;
  width: min(720px, 85%);
  max-width: 720px;
  max-height: 460px;
  transform: translateX(-50%);
}

#questionTitle,
#questionText {
  text-align: left;
}

#questionText {
  font-family: var(--game-question-font);
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #eaf8ff;
  text-shadow: none;
  max-width: 66ch;
}

#answers {
  grid-template-columns: 1fr;
  gap: 8px;
}

#gameWrap .answer {
  display: block;
  width: 100%;
  font-family: var(--game-answer-font);
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: 0.03em;
  color: #f3fbff;
  text-shadow: none;
  padding: 8px 12px;
  white-space: normal;
  text-wrap: pretty;
}

.answer-hint {
  font-family: var(--game-question-font);
  text-align: left;
}

.signal-game-topbar h2,
#questionTitle {
  font-family: var(--game-retro-font);
  letter-spacing: 1px;
}

#questionText {
  font-family: var(--game-question-font);
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #eaf8ff;
  text-shadow: none;
}

@media (max-width: 760px) {
  #ui {
    max-width: calc(100% - 18px);
  }

  #ui .hud-chip {
    font-size: 8px;
    padding: 4px 7px;
  }

  #questionPanel,
  #questionPanel.final-baron-question,
  #questionPanel.static-baron-question {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    max-height: 52%;
    transform: none;
  }
}
/* Intern In The Stars intro video screen */
.signal-intro-screen {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: none;
  place-items: center;
  padding: 14px 18px;
  background:
    radial-gradient(circle at center, rgba(100, 210, 255, 0.16), transparent 46%),
    rgba(0, 0, 0, 0.78);
}

.signal-intro-screen.is-active {
  display: grid;
}

.signal-game-modal.intro-active .signal-game-topbar {
  justify-content: space-between;
  margin-bottom: 8px;
  border-bottom-color: transparent;
  padding-bottom: 0;
}

.signal-game-modal.intro-active .signal-game-crt-shell {
  background: linear-gradient(180deg, rgba(5, 14, 24, 0.98), rgba(0, 3, 8, 0.99));
}

.signal-game-modal.intro-active .signal-game-bezel,
.signal-game-modal.intro-active #gameWrap::before {
  opacity: 0;
}

.signal-intro-card {
  width: min(92%, 760px);
  padding: 16px 18px 14px;
  border: 1px solid rgba(57, 255, 136, 0.65);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(5, 18, 24, 0.96), rgba(2, 7, 10, 0.98));
  box-shadow:
    0 0 28px rgba(57, 255, 136, 0.18),
    inset 0 0 22px rgba(100, 210, 255, 0.08);
  text-align: center;
}

.signal-intro-kicker {
  margin: 0 0 10px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.signal-intro-card h3 {
  margin: 0 0 12px;
  color: var(--green);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1rem, 2.6vw, 1.55rem);
  line-height: 1.25;
}

.signal-intro-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 248px;
  overflow: hidden;
  border: 1px solid rgba(100, 210, 255, 0.55);
  border-radius: 12px;
  background:
    radial-gradient(circle at center, rgba(100, 210, 255, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(4, 12, 20, 1), rgba(0, 0, 0, 1));
  box-shadow:
    inset 0 0 32px rgba(0, 0, 0, 0.78),
    0 0 18px rgba(100, 210, 255, 0.16);
}

.signal-intro-video-frame::before,
.signal-intro-video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.signal-intro-video-frame::before {
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 248, 220, 0.2), transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 16%, transparent 78%, rgba(0, 0, 0, 0.18));
  opacity: 0.42;
}

.signal-intro-video-frame::after {
  inset: -1.5%;
  background: url("assets/rail-shooter/ui/crt-tv-frame.png") center / 100% 100% no-repeat;
  opacity: 0.62;
}

.signal-intro-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  position: relative;
  z-index: 1;
}

.signal-intro-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  color: #d8ffe7;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(circle at center, rgba(255, 209, 102, 0.12), transparent 52%),
    rgba(2, 8, 12, 0.96);
}

.signal-intro-fallback[hidden] {
  display: none !important;
}

.signal-intro-fallback-title {
  margin: 0;
  color: var(--amber);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.8rem, 2.2vw, 1.15rem);
}

.signal-intro-fallback p {
  max-width: 44ch;
  margin: 0;
}

.signal-intro-copy {
  margin: 0 auto 12px;
  max-width: 44ch;
  color: #f3fff9;
  font-size: clamp(1rem, 1.55vw, 1.12rem);
  line-height: 1.45;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8), 0 0 14px rgba(87, 255, 154, 0.12);
}

.signal-intro-skip {
  margin-top: 12px;
  border: 1px solid var(--amber);
  background: rgba(255, 209, 102, 0.1);
  color: var(--amber);
  padding: 10px 16px;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.signal-intro-skip:hover,
.signal-intro-skip:focus {
  background: var(--amber);
  color: #1c1200;
}

@media (max-width: 760px) {
  .signal-intro-screen {
    padding: 10px;
  }

  .signal-intro-card {
    width: 100%;
    padding: 12px;
  }

  .signal-intro-video-frame {
    min-height: 184px;
  }
}

.crawler-shield {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000;
  color: #e9f7ff;
  font-family: "Share Tech Mono", "Courier New", monospace;
}

.crawler-shield-card {
  width: min(520px, calc(100vw - 40px));
  border: 1px solid rgba(255, 107, 125, 0.62);
  background: rgba(20, 3, 7, 0.95);
  box-shadow: 0 0 28px rgba(255, 107, 125, 0.18);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}

.crawler-shield-card h1 {
  margin: 0 0 10px;
  color: #ff6b7d;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Permanent Signal Run layout tuning */
.signal-game-crt-shell {
  width: min(1120px, calc(100vw - 48px)) !important;
  max-height: calc(100vh - 24px) !important;
  overflow: hidden !important;
}

#gameWrap {
  width: min(770px, calc(100vw - 88px), calc(78vh * 1020 / 745)) !important;
  height: auto !important;
  max-height: 78vh !important;
  margin: 0 auto 16px !important;
}

#gameWrap canvas {
  display: block !important;
  width: calc(100% - 18px) !important;
  height: auto !important;
  aspect-ratio: 1020 / 745 !important;
  margin: 9px auto !important;
}

.signal-intro-card {
  width: min(674px, calc(100vw - 72px)) !important;
  min-height: 0 !important;
  padding: 24px 19px !important;
  border-width: 5px !important;
  border-style: solid !important;
  border-color: rgba(57, 255, 136, 0.09) !important;
  border-radius: 60px !important;
  background: rgba(2, 12, 16, 1) !important;
  box-shadow:
    0 0 42px rgba(57, 255, 136, 0.22),
    inset 0 0 21px rgba(100, 210, 255, 0.08) !important;
}

.signal-intro-copy {
  margin-top: 16px !important;
  margin-bottom: 52px !important;
  font-size: 23px !important;
  line-height: 1.09 !important;
  max-width: 38ch !important;
}

.signal-intro-video-frame {
  position: relative !important;
  isolation: isolate !important;
  width: min(320px, 100%) !important;
  aspect-ratio: 1672 / 941 !important;
  transform: scale(1.6) !important;
  transform-origin: center center !important;
  margin: 0 auto !important;
  margin-top: -12px !important;
  margin-bottom: -14px !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.signal-intro-video-frame::before,
.signal-intro-video-frame::after {
  content: none !important;
  display: none !important;
}

.signal-intro-video-frame::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  pointer-events: none !important;
  background: url("assets/rail-shooter/ui/IntroTube.png") center / contain no-repeat !important;
}

.signal-intro-video-screen {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  overflow: visible !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.signal-intro-video,
.signal-intro-fallback {
  position: absolute !important;
  top: 61.4% !important;
  left: 45.7% !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  transform: translate(-46.5%, -35.3%) scale(1.93) !important;
  transform-origin: center center !important;
  object-fit: fill !important;
  object-position: 0% 0% !important;
  border-radius: 17% / 6.5% !important;
}

.signal-intro-video {
  z-index: 1 !important;
  display: block !important;
  background: #000 !important;
}

.signal-intro-fallback {
  z-index: 2 !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px !important;
  text-align: center !important;
  background: #000 !important;
}

.signal-intro-skip {
  margin-top: 50px !important;
  padding: 14px 31px !important;
  font-size: 21px !important;
  border-radius: 11px !important;
}

/* Protect leaderboard form controls from overlay hit-testing conflicts */
#highScoreForm,
.signal-run-highscore-form-row,
#highScoreName,
#highScoreSubmit {
  position: relative;
  z-index: 30;
  pointer-events: auto;
}

/* Compact start overlay without shrinking the game shell */
#overlay {
  padding: 18px !important;
}

#overlay > div {
  width: min(100%, 760px) !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  padding: 8px 10px 12px !important;
  box-sizing: border-box !important;
}

.practice-box {
  width: min(100%, 640px) !important;
  max-width: 640px !important;
  margin: 12px auto !important;
}

#practiceCanvas {
  width: 100% !important;
  max-width: 640px !important;
  height: auto !important;
}

.practice-controls {
  width: 100% !important;
  max-width: 640px !important;
  margin: 0 auto !important;
  gap: 6px !important;
  padding: 8px !important;
}

.start-controls {
  width: min(100%, 560px) !important;
  max-width: 560px !important;
  margin: 12px auto !important;
  gap: 6px 12px !important;
}

#startBtn {
  width: min(100%, 280px) !important;
  margin: 10px auto 0 !important;
}
