  :root {
    --bg-0: #03040a;
    --bg-1: #07091a;
    --bg-2: #0d1024;
    --ink: #e8ecff;
    --ink-soft: #9ea3c4;
    --dim: #4a5078;

    --warrior: #ff2e5a;
    --warrior-2: #ff7090;
    --warrior-dark: #4a0a1c;
    --mage: #00e7ff;
    --mage-2: #6ef5ff;
    --mage-dark: #003845;
    --rogue: #ffc700;
    --rogue-2: #ffe566;
    --rogue-dark: #4d3a00;

    --grid: rgba(110, 245, 255, 0.06);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  /* ============================================
     CORE ANIMATIONS
     ============================================ */
  @keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
  }

  @keyframes flicker {
    0%, 95%, 100% { opacity: 1; }
    96% { opacity: 0.88; }
    97.5% { opacity: 0.95; }
    98.5% { opacity: 0.85; }
  }

  @keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 12px currentColor); }
    50% { filter: drop-shadow(0 0 24px currentColor) drop-shadow(0 0 4px currentColor); }
  }

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

  @keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }

  @keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
  }

  @keyframes blink-fast {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.2; }
  }

  @keyframes ready-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
  }

  @keyframes border-flow {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
  }

  @keyframes data-stream {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(40px); opacity: 0; }
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* ============================================
     INTRO ANIMATIONS
     ============================================ */
  @keyframes boot-scan {
    0% { height: 100vh; top: 0; }
    100% { height: 0; top: 50vh; }
  }

  @keyframes power-on {
    0% { transform: scaleY(0); opacity: 0; }
    50% { transform: scaleY(0.005); opacity: 1; }
    51% { transform: scaleY(0.005); }
    100% { transform: scaleY(1); opacity: 1; }
  }

  @keyframes title-zoom-in {
    0% { transform: scale(0.3) translateY(40px); opacity: 0; filter: blur(20px); }
    50% { opacity: 1; filter: blur(0); }
    70% { transform: scale(1.1) translateY(0); }
    100% { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }
  }

  @keyframes text-glitch {
    0%, 100% { transform: translate(0); text-shadow: 0 0 20px rgba(0, 231, 255, 0.5), 3px 0 0 var(--warrior), -3px 0 0 var(--mage); }
    20% { transform: translate(-2px, 1px); text-shadow: 0 0 20px rgba(0, 231, 255, 0.5), -3px 0 0 var(--warrior), 3px 0 0 var(--mage); }
    40% { transform: translate(2px, -1px); text-shadow: 0 0 20px rgba(0, 231, 255, 0.5), 3px 0 0 var(--warrior), -3px 0 0 var(--mage); }
    60% { transform: translate(0, 1px); text-shadow: 0 0 20px rgba(0, 231, 255, 0.5), -3px 0 0 var(--warrior), 3px 0 0 var(--mage); }
    80% { transform: translate(-1px, 0); }
  }

  @keyframes typewriter {
    0% { width: 0; }
    100% { width: 100%; }
  }

  @keyframes intro-exit-flash {
    0% { background: rgba(255, 255, 255, 0); }
    20% { background: rgba(255, 255, 255, 0.95); }
    100% { background: rgba(255, 255, 255, 0); }
  }

  @keyframes intro-fade-out {
    0% { opacity: 1; transform: scale(1); filter: blur(0); }
    50% { transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1.4); filter: blur(20px); }
  }

  @keyframes glitch-out {
    0% { clip-path: inset(0 0 0 0); transform: translate(0); }
    10% { clip-path: inset(20% 0 50% 0); transform: translate(-20px, 0); }
    20% { clip-path: inset(50% 0 20% 0); transform: translate(20px, 0); }
    30% { clip-path: inset(30% 0 40% 0); transform: translate(-15px, 5px); }
    40% { clip-path: inset(60% 0 10% 0); transform: translate(10px, -5px); }
    50% { clip-path: inset(10% 0 70% 0); transform: translate(-25px, 0); }
    60% { clip-path: inset(40% 0 30% 0); transform: translate(20px, 10px); }
    70% { clip-path: inset(70% 0 5% 0); transform: translate(-10px, -10px); }
    80% { clip-path: inset(0% 0 80% 0); transform: translate(5px, 0); }
    90% { clip-path: inset(50% 0 30% 0); transform: translate(0); }
    100% { clip-path: inset(0 0 0 0); transform: translate(0); opacity: 0; }
  }

  @keyframes menu-reveal {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
  }

  @keyframes loading-bar {
    0% { width: 0%; }
    100% { width: 100%; }
  }

  @keyframes boot-line {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
  }

  /* ============================================
     BASE
     ============================================ */
  html, body {
    background: #000;
    color: var(--ink);
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }

  /* Lock scroll only while intro is active */
  body:not(.menu-active) {
    overflow: hidden;
  }

  body.menu-active {
    overflow-x: hidden;
    overflow-y: auto;
  }

  /* ============================================
     INTRO SCREEN
     ============================================ */
  #intro {
    position: fixed;
    inset: 0;
    background: var(--bg-0);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    overflow: hidden;
  }

  /* CRT power-on effect */
  #intro::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at center, rgba(0, 231, 255, 0.15), transparent 60%),
      radial-gradient(circle at 30% 70%, rgba(255, 46, 90, 0.1), transparent 50%),
      radial-gradient(circle at 70% 30%, rgba(255, 199, 0, 0.08), transparent 50%);
    animation: flicker 4s infinite;
  }

  /* Power-on scan line */
  #intro::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--mage), var(--mage), transparent);
    box-shadow: 0 0 20px var(--mage), 0 0 40px var(--mage);
    z-index: 5;
    animation: boot-scan 1.2s cubic-bezier(0.6, 0, 0.4, 1) forwards;
  }

  .intro-content {
    position: relative;
    z-index: 2;
    text-align: center;
    transform: scaleY(0);
    animation: power-on 1.2s cubic-bezier(0.6, 0, 0.4, 1) 0.4s forwards;
  }

  /* Boot sequence text */
  .boot-log {
    position: absolute;
    top: 24px;
    left: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--mage);
    line-height: 1.7;
    text-align: left;
    opacity: 0.6;
    z-index: 3;
  }

  .boot-log .line {
    opacity: 0;
    animation: boot-line 0.2s forwards;
  }

  .boot-log .line:nth-child(1) { animation-delay: 1.5s; }
  .boot-log .line:nth-child(2) { animation-delay: 1.7s; }
  .boot-log .line:nth-child(3) { animation-delay: 1.9s; }
  .boot-log .line:nth-child(4) { animation-delay: 2.1s; }
  .boot-log .line:nth-child(5) { animation-delay: 2.3s; }
  .boot-log .line:nth-child(6) { animation-delay: 2.5s; }
  .boot-log .line:nth-child(7) { animation-delay: 2.7s; }
  .boot-log .line:nth-child(8) { animation-delay: 2.9s; }

  .boot-log .ok { color: #4ade80; }
  .boot-log .warn { color: var(--rogue); }

  /* Studio mark */
  .studio-mark {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--ink-soft);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 32px;
    opacity: 0;
    animation: boot-line 0.6s ease-out 1.8s forwards;
  }

  .studio-mark::before, .studio-mark::after {
    content: '·';
    margin: 0 12px;
    color: var(--mage);
  }

  /* Main logo / title */
  .intro-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: var(--mage);
    animation: pulse-glow 2s ease-in-out infinite;
    opacity: 0;
    animation: pulse-glow 2s ease-in-out infinite, boot-line 0.6s ease-out 2.2s forwards;
  }

  .intro-logo svg {
    width: 100%;
    height: 100%;
  }

  .intro-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(60px, 12vw, 140px);
    line-height: 0.9;
    letter-spacing: 0.04em;
    color: var(--ink);
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0;
    animation:
      title-zoom-in 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 2.4s forwards,
      text-glitch 6s infinite 4s;
    position: relative;
    display: inline-block;
  }

  .intro-title .dot {
    color: var(--warrior);
  }

  .intro-title .ext {
    background: linear-gradient(90deg, var(--warrior), var(--mage), var(--rogue));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
  }

  .intro-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--ink-soft);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 64px;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--mage);
    width: 0;
    margin-left: auto;
    margin-right: auto;
    animation:
      typewriter 1.8s steps(40) 3.6s forwards,
      blink 0.8s step-end 5.4s infinite;
    max-width: fit-content;
  }

  /* PRESS START */
  .press-start {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(16px, 2vw, 22px);
    color: var(--ink);
    letter-spacing: 0.2em;
    text-shadow:
      0 0 12px var(--mage),
      0 0 24px var(--mage),
      0 0 4px var(--mage);
    opacity: 0;
    animation:
      boot-line 0.6s ease-out 5.5s forwards,
      blink-fast 0.8s step-end 5.5s infinite;
    margin-bottom: 24px;
  }

  .press-start .key-box {
    display: inline-block;
    padding: 8px 14px;
    border: 2px solid var(--mage);
    margin: 0 4px;
    background: rgba(0, 231, 255, 0.1);
    box-shadow:
      inset 0 0 12px rgba(0, 231, 255, 0.3),
      0 0 16px rgba(0, 231, 255, 0.4);
  }

  /* Loading bar (appears after click) */
  .loading-section {
    margin-top: 16px;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .loading-section.active {
    opacity: 1;
  }

  .loading-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    color: var(--mage);
    letter-spacing: 0.2em;
    margin-bottom: 12px;
  }

  .loading-bar-container {
    width: 320px;
    height: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--mage);
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 0 16px rgba(0, 231, 255, 0.3);
  }

  .loading-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mage-dark), var(--mage));
    box-shadow: 0 0 16px var(--mage);
    width: 0;
    position: relative;
  }

  .loading-section.active .loading-bar-fill {
    animation: loading-bar 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }

  .loading-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 50% 100%;
    animation: shimmer 1s linear infinite;
  }

  .loading-percent {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: var(--mage);
    margin-top: 8px;
    letter-spacing: 0.1em;
  }

  /* Bottom info bar */
  .intro-footer {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: var(--dim);
    letter-spacing: 0.15em;
    opacity: 0;
    animation: boot-line 0.6s ease-out 4.5s forwards;
    z-index: 3;
  }

  .intro-footer .copyright {
    color: var(--ink-soft);
  }

  .intro-footer .version {
    color: var(--mage);
  }

  /* Scanlines + noise on intro */
  .intro-scanlines {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
  }

  .intro-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 4;
  }

  /* Intro exit states */
  #intro.exiting {
    pointer-events: none;
  }

  #intro.exiting .intro-content {
    animation: glitch-out 0.8s cubic-bezier(0.4, 0, 0.6, 1) forwards;
  }

  #intro.flash::before {
    animation: intro-exit-flash 0.4s ease-out forwards;
  }

  #intro.fade-out {
    animation: intro-fade-out 0.6s ease-in 0.5s forwards;
  }

  /* ============================================
     MENU (initially hidden)
     ============================================ */
  #menu {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    background: var(--bg-0);
    min-height: 100vh;
    position: relative;
    z-index: 1;
  }

  #menu.active {
    opacity: 1;
    pointer-events: auto;
  }

  #menu.active .menu-anim {
    animation: menu-reveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  }

  #menu.active .menu-anim-1 { animation-delay: 0s; }
  #menu.active .menu-anim-2 { animation-delay: 0.15s; }
  #menu.active .menu-anim-3 { animation-delay: 0.3s; }
  #menu.active .menu-anim-4 { animation-delay: 0.45s; }
  #menu.active .menu-anim-5 { animation-delay: 0.6s; }

  .menu-anim { opacity: 0; }

  /* Background */
  #menu::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(circle at 15% 25%, rgba(255, 46, 90, 0.15), transparent 35%),
      radial-gradient(circle at 85% 30%, rgba(0, 231, 255, 0.15), transparent 35%),
      radial-gradient(circle at 50% 90%, rgba(255, 199, 0, 0.1), transparent 50%);
    z-index: 0;
    pointer-events: none;
    animation: flicker 8s infinite;
  }

  #menu::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: -10%;
    right: -10%;
    height: 60vh;
    background-image:
      linear-gradient(var(--grid) 2px, transparent 2px),
      linear-gradient(90deg, var(--grid) 2px, transparent 2px);
    background-size: 60px 60px;
    transform: perspective(500px) rotateX(65deg);
    transform-origin: bottom;
    mask-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
  }

  #menu .menu-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 12px;
    position: relative;
    z-index: 1;
  }

  /* Persistent scanline on menu */
  .menu-scanline {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 231, 255, 0.04) 50%, transparent 100%);
    height: 240px;
    pointer-events: none;
    z-index: 100;
    animation: scanline 9s linear infinite;
  }

  .menu-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
  }

  /* HUD Header */
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(180deg, rgba(7, 9, 26, 0.9) 0%, rgba(7, 9, 26, 0.7) 100%);
    backdrop-filter: blur(12px);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(0, 231, 255, 0.3);
    border-bottom: 1px solid rgba(0, 231, 255, 0.3);
    flex-shrink: 0;
  }

  header::before, header::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
  }
  header::before {
    top: -1px; left: -1px;
    border-top: 2px solid var(--mage);
    border-left: 2px solid var(--mage);
  }
  header::after {
    bottom: -1px; right: -1px;
    border-bottom: 2px solid var(--mage);
    border-right: 2px solid var(--mage);
  }

  .logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    color: var(--mage);
    animation: pulse-glow 2.5s ease-in-out infinite;
  }

  .logo span {
    background: linear-gradient(90deg, var(--mage), var(--warrior));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hud-stats {
    display: flex;
    gap: 28px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: var(--ink-soft);
    letter-spacing: 0.05em;
  }

  .stat-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .stat-label {
    color: var(--dim);
    font-size: 7px;
  }

  .stat-value {
    color: var(--mage);
    text-shadow: 0 0 8px currentColor;
  }

  .stat-value.gold {
    color: var(--rogue);
  }

  .stat-value .live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 8px #4ade80;
    animation: blink-fast 1.5s infinite;
  }

  /* Main */
  main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 8px;
    position: relative;
    z-index: 2;
    min-height: 0;
  }

  .title-block {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    flex-shrink: 0;
  }

  .level-tag {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: var(--mage);
    letter-spacing: 0.25em;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 12px var(--mage);
  }

  .level-tag::before, .level-tag::after {
    content: '';
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--mage));
    box-shadow: 0 0 8px var(--mage);
  }

  .title-block h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(32px, 4.5vw, 56px);
    line-height: 0.95;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
    text-shadow:
      0 0 20px rgba(0, 231, 255, 0.2),
      4px 4px 0 rgba(255, 46, 90, 0.15),
      -4px -4px 0 rgba(0, 231, 255, 0.15);
  }

  .title-block h1 .accent {
    background: linear-gradient(90deg, var(--warrior) 0%, var(--mage) 50%, var(--rogue) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
  }

  .subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 12px;
    color: var(--ink-soft);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 10px;
  }

  .subtitle .blink-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--mage);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s infinite;
  }

  /* Grid */
  .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    flex-shrink: 0;
  }

  .character {
    position: relative;
    background: linear-gradient(180deg, rgba(13, 16, 36, 0.95) 0%, rgba(3, 4, 10, 0.98) 100%);
    border: 1px solid rgba(110, 124, 200, 0.15);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    clip-path: polygon(
      0 0,
      calc(100% - 20px) 0,
      100% 20px,
      100% 100%,
      20px 100%,
      0 calc(100% - 20px)
    );
  }

  .character::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(120deg, transparent 30%, var(--class-color) 50%, transparent 70%);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 5;
  }

  .character:hover::before {
    opacity: 1;
    animation: border-flow 2s linear infinite;
  }

  .corner-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(225deg, var(--class-color) 0%, transparent 50%);
    z-index: 3;
    pointer-events: none;
    opacity: 0.6;
  }

  .corner-accent::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--class-color);
    box-shadow: 0 0 12px var(--class-color);
    border-radius: 50%;
    animation: blink-fast 1.2s infinite;
  }

  .character:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 60px var(--class-glow), inset 0 0 80px rgba(255, 255, 255, 0.02);
  }

  .character:hover .corner-accent { opacity: 1; }

  .char-warrior { --class-color: var(--warrior); --class-color-2: var(--warrior-2); --class-dark: var(--warrior-dark); --class-glow: rgba(255, 46, 90, 0.5); }
  .char-mage { --class-color: var(--mage); --class-color-2: var(--mage-2); --class-dark: var(--mage-dark); --class-glow: rgba(0, 231, 255, 0.5); }
  .char-rogue { --class-color: var(--rogue); --class-color-2: var(--rogue-2); --class-dark: var(--rogue-dark); --class-glow: rgba(255, 199, 0, 0.5); }

  .char-banner {
    position: relative;
    padding: 10px 18px;
    background: linear-gradient(90deg, var(--class-color) 0%, var(--class-dark) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    letter-spacing: 0.12em;
    color: #000;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 2;
  }

  .char-banner .banner-id { display: flex; align-items: center; gap: 8px; }
  .char-banner .id-dot { width: 6px; height: 6px; background: #000; border-radius: 50%; }
  .char-banner .class-num { color: rgba(0, 0, 0, 0.6); font-size: 9px; }

  .char-portrait {
    height: 140px;
    position: relative;
    background:
      radial-gradient(ellipse at center, var(--class-glow) 0%, transparent 70%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .char-portrait::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.18) 50%);
    background-size: 100% 3px;
    pointer-events: none;
    z-index: 2;
  }

  .char-portrait::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0deg, var(--class-glow) 60deg, transparent 120deg, transparent 180deg, var(--class-glow) 240deg, transparent 300deg);
    opacity: 0.2;
    animation: spin 20s linear infinite;
    z-index: 1;
  }

  .char-sprite {
    position: relative;
    z-index: 3;
    width: 95px;
    height: 95px;
    color: var(--class-color);
    animation: float 3.5s ease-in-out infinite;
    filter: drop-shadow(0 0 16px var(--class-color)) drop-shadow(0 0 4px var(--class-color));
  }

  .char-sprite svg { width: 100%; height: 100%; }
  .character:hover .char-sprite { animation: float 1.5s ease-in-out infinite; }

  .data-particle {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--class-color);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 0 8px currentColor;
  }

  .character:hover .data-particle {
    animation: data-stream 2s linear infinite;
  }

  .data-particle.p1 { top: 20%; left: 15%; animation-delay: 0s; }
  .data-particle.p2 { top: 40%; right: 20%; animation-delay: 0.5s; }
  .data-particle.p3 { top: 60%; left: 25%; animation-delay: 1s; }
  .data-particle.p4 { top: 30%; right: 30%; animation-delay: 1.5s; }

  .char-info {
    flex: 1;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
  }

  .char-role {
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    color: var(--class-color);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 6px;
    text-shadow: 0 0 8px currentColor;
  }

  .char-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 3px;
  }

  .char-name .accent { color: var(--class-color); }

  .char-tagline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .char-desc {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-soft);
    font-weight: 400;
    margin-top: 2px;
  }

  .char-stats {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 2px;
  }

  .stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    color: var(--dim);
    letter-spacing: 0.15em;
    padding-bottom: 4px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    margin-bottom: 2px;
  }

  .stats-header .max { color: var(--class-color); }

  .stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
  }

  .stat-name { width: 50px; color: var(--ink-soft); text-transform: uppercase; font-weight: 500; font-size: 9px; }

  .stat-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 0 100%);
  }

  .stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--class-color), var(--class-color-2));
    box-shadow: 0 0 8px var(--class-color);
    position: relative;
    transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .character:hover .stat-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 50% 100%;
    animation: shimmer 1.5s linear infinite;
  }

  .stat-num {
    width: 36px;
    text-align: right;
    color: var(--class-color);
    font-weight: 700;
    text-shadow: 0 0 6px currentColor;
  }

  .char-abilities { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }

  .ability {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.08em;
    color: var(--class-color);
    padding: 3px 8px;
    border: 1px solid var(--class-color);
    background: rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    font-weight: 500;
  }

  .select-btn {
    margin: 0 18px 18px;
    padding: 12px 16px;
    background: linear-gradient(90deg, var(--class-color) 0%, var(--class-color-2) 100%);
    color: #000;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    position: relative;
    transition: all 0.3s ease;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .select-btn::before {
    content: '►';
    opacity: 0;
    transform: translateX(-12px);
    transition: all 0.3s ease;
  }

  .character:hover .select-btn {
    box-shadow: 0 0 32px var(--class-glow), inset 0 0 12px rgba(255, 255, 255, 0.4);
    animation: ready-pulse 0.8s ease-in-out infinite;
  }

  .character:hover .select-btn::before { opacity: 1; transform: translateX(0); }

  .press-key {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: var(--class-color);
    letter-spacing: 0.1em;
    z-index: 4;
    opacity: 0.4;
    transition: opacity 0.3s;
  }

  .character:hover .press-key { opacity: 1; animation: blink-fast 1s infinite; }

  .key-button {
    display: inline-block;
    padding: 3px 6px;
    border: 1px solid var(--class-color);
    background: rgba(0, 0, 0, 0.5);
    margin-right: 6px;
  }

  footer {
    margin-top: 16px;
    padding: 10px 20px;
    background: rgba(7, 9, 26, 0.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 231, 255, 0.2);
    border-bottom: 1px solid rgba(0, 231, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    color: var(--dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    max-width: 1440px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
  }

  .footer-controls { display: flex; gap: 20px; align-items: center; }
  .footer-controls .ctrl-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }
  .footer-controls .key { padding: 3px 7px; border: 1px solid var(--ink-soft); background: rgba(0, 0, 0, 0.4); font-size: 8px; }

  footer .socials { display: flex; gap: 18px; }
  footer a { color: var(--ink-soft); text-decoration: none; transition: all 0.2s; }
  footer a:hover { color: var(--mage); text-shadow: 0 0 8px var(--mage); }

  /* Skip intro button */
  .skip-intro {
    position: absolute;
    top: 24px;
    right: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--mage);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 231, 255, 0.55);
    padding: 6px 12px;
    cursor: pointer;
    z-index: 6;
    opacity: 0;
    transition: all 0.2s;
    animation: boot-line 0.4s ease-out 0.15s forwards;
  }

  .skip-intro:focus-visible {
    outline: none;
    color: var(--mage);
    border-color: var(--mage);
    box-shadow: 0 0 12px rgba(0, 231, 255, 0.3);
  }

  .skip-intro:hover {
    color: var(--mage);
    border-color: var(--mage);
    box-shadow: 0 0 12px rgba(0, 231, 255, 0.3);
  }

  /* ============================================
     LANGUAGE SWITCHER
     ============================================ */
  .lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--mage);
    padding: 4px;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    box-shadow: 0 0 12px rgba(0, 231, 255, 0.2);
    z-index: 6;
  }

  .lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    background: transparent;
    border: none;
    color: var(--ink-soft);
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .lang-btn:hover {
    color: var(--mage);
  }

  .lang-btn.active {
    background: var(--mage);
    color: #000;
    text-shadow: none;
  }

  .lang-btn .flag {
    width: 16px;
    height: 12px;
    display: inline-block;
    border-radius: 1px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }

  .lang-btn .flag svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  /* Intro language switcher: positioned absolute top left */
  .lang-switcher.intro-lang {
    position: absolute;
    top: 24px;
    left: 24px;
    opacity: 0;
    animation: boot-line 0.6s ease-out 1s forwards;
  }

  /* Menu language switcher: inside header, at the right */
  .lang-switcher.menu-lang {
    margin-left: 8px;
    flex-shrink: 0;
  }

  /* Show/hide based on device */
  .mobile-only { display: none; }
  .desktop-only { display: inline; }
  .hide-mobile { display: flex; }
  .mobile-scroll-hint { display: none; }

  @media (max-width: 640px) {
    .mobile-only { display: inline; }
    .desktop-only { display: none; }
    .hide-mobile { display: none !important; }
  }

  /* ============================================
     RESPONSIVE — TABLET (≤1024px)
     ============================================ */
  @media (max-width: 1024px) {
    /* Allow vertical scroll on menu since grid becomes 1 column */
    #menu .menu-container { height: auto; min-height: 100vh; }
    main { justify-content: flex-start; }

    /* Grid: 1 column, full-width cards */
    .grid { grid-template-columns: 1fr; gap: 16px; }
    .character { min-height: auto; }
    .char-portrait { height: 180px; }
    .char-sprite { width: 120px; height: 120px; }

    .boot-log { font-size: 9px; }
  }

  /* ============================================
     RESPONSIVE — MOBILE (≤640px)
     ============================================ */
  @media (max-width: 640px) {

    /* === INTRO MOBILE === */
    .boot-log {
      display: none;
    }

    .skip-intro {
      top: 16px;
      right: 16px;
      font-size: 10px;
      padding: 5px 10px;
    }

    .lang-switcher.intro-lang {
      top: 16px;
      left: 16px;
      padding: 3px;
    }

    .lang-btn {
      font-size: 8px;
      padding: 4px 6px;
      gap: 4px;
    }

    .lang-btn .flag {
      width: 14px;
      height: 10px;
    }

    .lang-switcher.menu-lang {
      margin-left: 0;
    }

    .studio-mark {
      font-size: 8px;
      letter-spacing: 0.3em;
      margin-bottom: 20px;
    }

    .intro-logo {
      width: 60px;
      height: 60px;
      margin-bottom: 16px;
    }

    .intro-title {
      font-size: clamp(40px, 14vw, 72px);
      letter-spacing: 0.02em;
    }

    .intro-tagline {
      font-size: 10px;
      letter-spacing: 0.2em;
      margin-bottom: 40px;
    }

    .press-start {
      font-size: 14px;
      letter-spacing: 0.15em;
    }

    .press-start .key-box {
      padding: 6px 10px;
      font-size: 12px;
    }

    .loading-bar-container { width: 240px; }

    .intro-footer {
      bottom: 16px;
      left: 16px;
      right: 16px;
      flex-direction: column;
      gap: 6px;
      font-size: 7px;
      letter-spacing: 0.1em;
      text-align: center;
    }

    /* === MENU MOBILE — DENSE LAYOUT === */
    body { padding: 0; }
    #menu .menu-container { padding: 8px; }

    /* Header: more compact, single row */
    header {
      padding: 8px 12px;
      flex-direction: row;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
      flex-wrap: wrap;
    }

    .logo {
      font-size: 14px;
      gap: 8px;
    }

    .logo-icon {
      width: 22px;
      height: 22px;
    }

    .hud-stats {
      gap: 10px;
      width: auto;
      justify-content: flex-end;
      margin-left: auto;
    }

    .stat-block { gap: 2px; }
    .stat-label { font-size: 6px; }
    .stat-value { font-size: 7px; }

    /* Title block: compact */
    .title-block {
      margin-bottom: 12px;
    }

    .level-tag {
      font-size: 7px;
      letter-spacing: 0.15em;
      margin-bottom: 6px;
      gap: 6px;
    }

    .level-tag::before, .level-tag::after {
      width: 14px;
    }

    .title-block h1 {
      font-size: 26px;
      line-height: 1;
      letter-spacing: 0.02em;
      text-shadow:
        0 0 8px rgba(0, 231, 255, 0.2),
        2px 2px 0 rgba(255, 46, 90, 0.15),
        -2px -2px 0 rgba(0, 231, 255, 0.15);
    }

    .subtitle {
      font-size: 9px;
      letter-spacing: 0.1em;
      margin-top: 6px;
      padding: 0 8px;
    }

    /* Scroll indicator */
    .mobile-scroll-hint {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-family: 'Press Start 2P', monospace;
      font-size: 7px;
      color: var(--mage);
      letter-spacing: 0.15em;
      padding: 6px 0;
      margin-bottom: 8px;
      text-shadow: 0 0 8px var(--mage);
      animation: float 2s ease-in-out infinite;
    }

    .mobile-scroll-hint::before,
    .mobile-scroll-hint::after {
      content: '▼';
      animation: blink-fast 1.2s infinite;
    }

    /* Cards: compact mobile layout */
    .grid { gap: 12px; }

    .character {
      clip-path: polygon(
        0 0,
        calc(100% - 14px) 0,
        100% 14px,
        100% 100%,
        14px 100%,
        0 calc(100% - 14px)
      );
    }

    .character:hover {
      transform: none;
    }

    .char-banner {
      padding: 7px 12px;
      font-size: 8px;
      letter-spacing: 0.1em;
    }

    .char-banner .class-num { font-size: 7px; }

    .corner-accent {
      width: 50px;
      height: 50px;
    }

    /* Smaller portrait on mobile to save space */
    .char-portrait {
      height: 110px;
    }

    .char-sprite {
      width: 80px;
      height: 80px;
    }

    .char-info {
      padding: 12px 14px;
      gap: 8px;
    }

    .char-role {
      font-size: 7px;
      letter-spacing: 0.15em;
      margin-bottom: 2px;
    }

    .char-name {
      font-size: 22px;
      margin-bottom: 2px;
    }

    .char-tagline { font-size: 9px; }

    .char-desc {
      font-size: 12px;
      line-height: 1.4;
    }

    .char-stats {
      padding: 8px 10px;
      gap: 5px;
    }

    .stats-header {
      font-size: 6px;
    }

    .stat-row {
      gap: 8px;
      font-size: 8px;
    }

    .stat-name {
      width: 52px;
      font-size: 8px;
    }

    .stat-bar { height: 7px; }
    .stat-num { width: 28px; font-size: 8px; }

    .ability {
      font-size: 7px;
      padding: 3px 6px;
    }

    .select-btn {
      margin: 0 14px 14px;
      padding: 12px 14px;
      font-size: 10px;
      letter-spacing: 0.15em;
    }

    .press-key {
      display: none;
    }

    /* Footer: minimal */
    footer {
      flex-direction: column;
      gap: 8px;
      padding: 10px;
      text-align: center;
      font-size: 7px;
      letter-spacing: 0.1em;
      margin-top: 12px;
    }

    .footer-controls {
      display: none;
    }

    footer .socials {
      flex-wrap: wrap;
      justify-content: center;
      gap: 12px;
    }
  }

  /* ============================================
     RESPONSIVE — VERY SMALL MOBILE (≤380px)
     ============================================ */
  @media (max-width: 380px) {
    .intro-title { font-size: 36px; }
    .intro-tagline { font-size: 9px; }
    .press-start { font-size: 12px; }

    header { padding: 6px 10px; }
    .logo { font-size: 12px; }
    .logo-icon { width: 20px; height: 20px; }
    .hud-stats { gap: 8px; }

    .title-block h1 { font-size: 22px; }
    .subtitle { font-size: 8px; }
    .char-name { font-size: 20px; }
    .char-portrait { height: 100px; }
    .char-sprite { width: 70px; height: 70px; }
    .char-desc { font-size: 11px; }
  }

  /* ============================================
     LANDSCAPE PHONE (low height)
     ============================================ */
  @media (max-height: 500px) and (orientation: landscape) {
    .intro-content { transform: scale(0.7); }
    .boot-log { font-size: 8px; }
    .studio-mark { margin-bottom: 12px; }
    .intro-logo { width: 50px; height: 50px; margin-bottom: 8px; }
    .intro-title { font-size: 48px; }
    .intro-tagline { margin-bottom: 24px; }
  }

/* Additional worlds and services share the original character-select design. */
#menu .menu-container { height: auto; min-height: 100vh; }
main { padding-top: 24px; }
.character { min-width: 0; }
.character:focus-visible { outline: none; border-color: var(--class-color); box-shadow: inset 0 0 0 3px var(--class-color); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--mage); outline-offset: 4px; }
.char-elements { --class-color: #b793ff; --class-color-2: #dac9ff; --class-dark: #33234d; --class-glow: rgba(183,147,255,.3); }
.char-future { --class-color: #8fffc1; --class-color-2: #c3ffde; --class-dark: #163d2c; --class-glow: rgba(143,255,193,.3); }
.project-section { margin: 48px 0 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-kicker, .section-index { font: 10px 'JetBrains Mono', monospace; letter-spacing: .15em; color: var(--ink-soft); }
.section-kicker { color: var(--mage); margin-bottom: 8px; }
.section-heading h2 { font: 700 clamp(18px, 2.4vw, 26px) 'Orbitron', sans-serif; letter-spacing: .04em; }
.project-card .char-portrait { height: 130px; }
.project-card .char-info { padding: 22px; gap: 12px; }
.project-card .char-role { line-height: 1.8; margin: 0; }
.project-card .char-name { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; }
.project-card .char-desc { font-size: 17px; line-height: 1.5; }
.project-card .select-btn { font-size: 9px; line-height: 1.8; letter-spacing: .06em; }
@media (min-width: 641px) and (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  main { padding-top: 12px; }
  .project-section { margin-top: 32px; }
  .section-index { display: none; }
  .project-card .char-info { padding: 18px; }
  .project-card .char-portrait { height: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Social channels: portraits and platform marks in the existing arcade palette. */
.network-section { margin: 52px 0 28px; scroll-margin-top: 24px; }
.network-section .section-heading { margin-bottom: 12px; }
.network-intro { color: var(--ink-soft); font-size: 18px; line-height: 1.5; margin-bottom: 24px; }
.network-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.network-twitch { --network-color: #b793ff; }
.network-youtube { --network-color: #ff647b; }
.network-instagram { --network-color: #ffa3d7; }
.network-tiktok { --network-color: #6ef5ff; }
.network-linkedin { --network-color: #7bbcff; }
.network-discord { --network-color: #8c96ff; }
.network-portrait-mark { display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #5865f233 0%, #12182b 70%); }
.network-mark-big { position: absolute; inset: 0; display: grid; place-items: center; color: var(--network-color); opacity: .85; transition: transform .35s; }
.network-discord img { position: relative; object-position: center 25%; }
.network-discord .portrait-missing .network-person { display: none; }
.network-mark-big svg { width: 72px; height: 72px; }
.network-card:hover .network-mark-big, .network-card:focus-visible .network-mark-big { transform: scale(1.06); }
.network-card { min-width: 0; display: flex; flex-direction: column; position: relative; text-decoration: none; color: var(--ink); background: var(--bg-1); border: 1px solid #252a49; border-top: 2px solid var(--network-color); transition: transform .2s, border-color .2s, box-shadow .2s; }
.network-card:hover, .network-card:focus-visible { transform: translateY(-5px); border-color: var(--network-color); box-shadow: 0 10px 30px #0008; }
.network-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font: 9px 'JetBrains Mono', monospace; letter-spacing: .08em; color: var(--network-color); }
.network-top > :last-child { font-size: 18px; }
.network-portrait { height: 190px; position: relative; overflow: hidden; background: #12182b; }
.network-portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, #07091a 100%), repeating-linear-gradient(0deg, transparent 0 3px, #03040a18 3px 4px); pointer-events: none; }
.network-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 10%; filter: grayscale(1) contrast(1.08); transition: transform .35s; }
.network-card:hover img, .network-card:focus-visible img { transform: scale(1.04); }
.network-twitch img { object-position: center 8%; }
.network-linkedin img { transform: scale(2); transform-origin: 60% 24%; }
.network-linkedin:hover img, .network-linkedin:focus-visible img { transform: scale(2.05); }
.network-logo { position: absolute; z-index: 1; top: 12px; left: 12px; display: grid; place-items: center; width: 40px; height: 40px; color: var(--network-color); background: #07091aee; border: 1px solid var(--network-color); border-radius: 7px; }
.network-logo svg { width: 22px; height: 22px; }
.network-person { position: absolute; z-index: 1; bottom: 12px; right: 12px; color: #cbd0e5; font: 9px 'JetBrains Mono', monospace; }
.network-info { padding: 17px 14px 20px; }
.network-info h3 { font: 700 clamp(15px, 1.4vw, 20px) 'Orbitron', sans-serif; }
.network-handle { font: 11px 'JetBrains Mono', monospace; color: var(--ink-soft); margin-top: 9px; overflow-wrap: anywhere; }
.network-cta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 13px 14px; border-top: 1px solid #252a49; color: var(--network-color); font: 10px 'JetBrains Mono', monospace; line-height: 1.5; }
.portrait-credits { margin-top: 16px; color: var(--ink-soft); font: 11px/1.7 'JetBrains Mono', monospace; }
.portrait-credits summary { cursor: pointer; width: fit-content; padding: 8px 0; }
.portrait-credits summary:focus-visible { outline: 2px solid var(--mage); outline-offset: 4px; }
.portrait-credits p { margin: 8px 0; }
.portrait-credits ul { padding-left: 18px; }
.portrait-credits a { color: inherit; text-underline-offset: 3px; }
@media (min-width: 641px) and (max-width: 1100px) {
  .network-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .network-section { margin-top: 36px; }
  .network-intro { font-size: 16px; }
  .network-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .network-portrait { height: 165px; }
  .network-top, .network-info, .network-cta { padding-left: 11px; padding-right: 11px; }
  .network-info h3 { font-size: 15px; }
  .network-handle { font-size: 10px; }
  .network-cta { font-size: 9px; }
}

/* Business identity: the card's magenta/orange accents inside the arcade UI. */
.profile-panel { --profile-pink: #ff54d9; --profile-orange: #ff985c; position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(310px, 1fr); gap: 42px; margin: 0 0 42px; padding: 38px; border: 1px solid #432240; background: linear-gradient(125deg, #140e22 0%, #080a16 55%, #170b1c 100%); scroll-margin-top: 24px; }
.profile-panel::before { content: ''; position: absolute; inset: -1px -1px auto; height: 2px; background: linear-gradient(90deg, var(--profile-pink), #8c48ff 48%, var(--profile-orange)); }
.profile-panel::after { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(132deg, transparent 60%, #ff54d908 60.1%, #ff54d908 69%, transparent 69.1%), radial-gradient(ellipse at 0 0, #ff54d90c, transparent 60%); }
.profile-copy { min-width: 0; }
.profile-copy > .section-kicker { color: var(--profile-pink); margin-bottom: 18px; }
.profile-copy h2 { font: 800 clamp(24px, 2.9vw, 42px)/1.2 'Orbitron', sans-serif; letter-spacing: -.035em; }
.profile-copy h2 > span { display: block; }
.profile-gradient { margin-top: 7px; background: linear-gradient(100deg, #ff8ae4, #ff54d9 42%, #ffb077); color: #ff8ae4; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.profile-intro { margin-top: 20px; max-width: 560px; color: var(--ink-soft); font-size: 19px; line-height: 1.5; }
.expertise-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; list-style: none; margin-top: 28px; }
.expertise-list li { min-width: 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid #ffffff16; padding-top: 13px; font-size: 16px; font-weight: 600; }
.expertise-icon { display: inline-flex; flex: 0 0 auto; color: #ff70dd; }
.expertise-icon svg { width: 24px; height: 24px; }
.expertise-number { margin-left: auto; color: #9b6e99; font: 9px 'JetBrains Mono', monospace; }
.profile-contact { padding: 24px; align-self: center; min-width: 0; background: #03040a99; border: 1px solid #653055; border-top-color: var(--profile-pink); box-shadow: 10px 10px 0 #ff54d905; }
.contact-kicker { display: flex; gap: 8px; align-items: center; color: var(--profile-pink); font: 9px 'JetBrains Mono', monospace; letter-spacing: .12em; }
.contact-indicator { width: 5px; height: 5px; background: var(--profile-pink); box-shadow: 0 0 10px #ff54d950; }
.profile-contact h3 { font: 600 22px/1.3 'Rajdhani', sans-serif; margin: 12px 0 20px; }
.profile-contact address { font-style: normal; display: grid; gap: 16px; }
.contact-link { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-height: 44px; }
.contact-link > svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--profile-pink); }
.contact-link > span:not(.contact-arrow) { min-width: 0; }
.contact-link small { display: block; color: var(--ink-soft); font: 8px 'JetBrains Mono', monospace; letter-spacing: .08em; margin-bottom: 5px; }
.contact-link strong { font: 600 17px 'Rajdhani', sans-serif; overflow-wrap: anywhere; }
.contact-arrow { color: var(--ink-soft); margin-left: auto; }
.contact-link:hover strong, .contact-link:hover .contact-arrow { color: var(--profile-pink); }
.profile-cta { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0 0; margin-top: 22px; border-top: 1px solid #ffffff20; color: #ff98df; text-decoration: none; font: 10px/1.5 'JetBrains Mono', monospace; }
.profile-cta:hover { color: var(--profile-orange); }
@media (max-width: 1000px) {
  .profile-panel { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding: 26px; }
  .profile-contact { padding: 20px; }
  .profile-copy h2 { font-size: 28px; }
  .expertise-list { gap: 12px; }
  .expertise-list li { gap: 8px; font-size: 14px; }
  .expertise-number { display: none; }
}
@media (max-width: 760px) {
  .profile-panel { grid-template-columns: 1fr; padding: 24px; gap: 26px; margin-bottom: 32px; }
  .profile-copy h2 { font-size: clamp(23px, 5.4vw, 36px); }
  .profile-intro { font-size: 17px; margin-top: 16px; }
  .expertise-list { margin-top: 22px; }
  .profile-contact { width: 100%; }
}
@media (max-width: 380px) {
  .profile-panel { padding: 19px 16px; }
  .profile-copy h2 { font-size: 22px; }
  .expertise-list li { align-items: flex-start; font-size: 14px; }
  .expertise-icon svg { width: 20px; height: 20px; }
  .profile-contact { padding: 16px; }
}

/* ============================================
   INTRO SKIP (click, key or SKIP / PASSER button)
   ============================================ */
#intro.skipped {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease-out;
}

/* ============================================
   PLAYER PATH: two game choices in the MAGE card
   ============================================ */
.character.has-choices { cursor: default; }

.path-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 18px 18px;
}

.path-choices-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--class-color);
  text-transform: uppercase;
  opacity: 0.8;
}

.path-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  min-height: 44px;
  color: var(--class-color);
  text-decoration: none;
  border: 1px solid var(--class-color);
  background: rgba(0, 0, 0, 0.35);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.path-choice-main {
  color: #000;
  border-color: transparent;
  background: linear-gradient(90deg, var(--class-color) 0%, var(--class-color-2) 100%);
}

.path-choice:hover,
.path-choice:focus-visible {
  outline: none;
  box-shadow: 0 0 28px var(--class-glow), inset 0 0 12px rgba(255, 255, 255, 0.25);
}

.path-choice:not(.path-choice-main):hover,
.path-choice:not(.path-choice-main):focus-visible {
  background: rgba(0, 231, 255, 0.12);
}

.choice-key {
  flex-shrink: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 3px 6px;
  border: 1px solid currentColor;
}

.choice-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.choice-text strong {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.choice-text small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.choice-arrow { flex-shrink: 0; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  #intro.skipped { transition: none; }
}
