  body {
    margin: 0;
    background: #1a1a2e;
    color: #eee;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    user-select: none;
  }
  h1 { margin: 8px 0; font-weight: 300; letter-spacing: 2px; }
  #wrap { position: relative; }
  canvas {
    background: linear-gradient(#3a4d6b, #6b8caf);
    border: 3px solid #444;
    border-radius: 6px;
    display: block;
  }
  #hud {
    position: absolute;
    top: 12px; left: 12px; right: 12px;
    display: flex; justify-content: space-between;
    pointer-events: none;
  }
  .barWrap { width: 38%; }
  .label { font-size: 12px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
  .bar { height: 18px; background: #222; border: 2px solid #000; border-radius: 4px; overflow: hidden; }
  .fill { height: 100%; transition: width 0.15s; }
  #p1 .fill { background: linear-gradient(#ff6b6b, #c0392b); }
  #p2 .fill { background: linear-gradient(#6bb5ff, #2c6fc0); }
  #p2 .label { text-align: right; justify-content: flex-end; }
  .buffs { font-size: 16px; letter-spacing: 4px; min-height: 18px; }
  #p1 .buffs { text-align: left; }
  #p2 .buffs { text-align: right; }
  #banner {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 48px; font-weight: bold; text-shadow: 0 4px 16px #000;
    display: none; pointer-events: none; text-align: center;
  }
  #banner .sub {
    display: block; font-size: 14px; font-weight: 400;
    margin-top: 14px; opacity: 0.85; text-shadow: 0 2px 6px #000;
  }
  #banner button {
    pointer-events: auto;
    margin-top: 18px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.6);
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    text-shadow: none;
  }
  #banner button:hover { background: rgba(255,255,255,0.3); }

  #menu {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(20,30,50,0.95));
    border-radius: 6px;
    z-index: 10;
  }
  #menu h2 {
    font-size: 56px; margin: 0 0 4px;
    letter-spacing: 8px; font-weight: 800;
    background: linear-gradient(90deg, #ff6b6b, #f1c40f, #6bb5ff);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    text-shadow: 0 4px 24px rgba(0,0,0,0.5);
  }
  #menu .tagline { font-size: 13px; opacity: 0.7; letter-spacing: 3px; margin-bottom: 36px; }
  #menu .modes { display: flex; flex-direction: column; gap: 14px; width: 320px; }
  .modeBtn {
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 16px 18px;
    border-radius: 8px;
    font-size: 17px;
    letter-spacing: 2px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    display: flex; align-items: center; justify-content: space-between;
  }
  .modeBtn:hover:not(:disabled) {
    background: rgba(255,255,255,0.16);
    border-color: #f1c40f;
    transform: translateY(-1px);
  }
  .modeBtn .desc { font-size: 11px; opacity: 0.6; letter-spacing: 1px; display: block; margin-top: 4px; font-weight: 300; }
  .modeBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }
  .modeBtn .badge {
    font-size: 10px; padding: 2px 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    letter-spacing: 1px;
  }
  .primary { border-color: #f1c40f; box-shadow: 0 0 16px rgba(241,196,15,0.25); }
  #menu .footer { margin-top: 28px; font-size: 11px; opacity: 0.55; letter-spacing: 2px; }
  .colorBtn:hover { transform: scale(1.1); border-color: #f1c40f !important; }
  #help { display: none; }
  #instructionsOverlay {
    position: absolute;
    bottom: 24px; left: 50%; transform: translateX(-50%);
    background: rgba(8, 12, 24, 0.7);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 4;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  }
  #instructionsOverlay.show { opacity: 1; }
  #menuBtn3 {
    position: absolute;
    top: 12px; right: 12px;
    height: 38px;
    background: rgba(20, 25, 40, 0.7);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 0;
    z-index: 5;
    transition: background 0.15s, border-color 0.15s;
  }
  #menuBtn3 .label {
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #f1c40f;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 12px 0 14px;
    height: 100%;
    display: none;            /* hidden until expanded */
    font-family: inherit;
  }
  #menuBtn3 .label:hover { background: rgba(241,196,15,0.18); }
  #menuBtn3.expanded { border-color: #f1c40f; background: rgba(241,196,15,0.10); }
  #menuBtn3.expanded .label { display: inline-block; }
  #menuBtn3 .lines {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
  }
  #menuBtn3 .lines:hover { background: rgba(255,255,255,0.10); border-radius: 6px; }
  #menuBtn3 .lines span {
    display: block;
    width: 20px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
  }
  kbd {
    background: #333; padding: 2px 6px; border-radius: 3px;
    border: 1px solid #555; font-family: monospace; font-size: 11px;
  }
