/* HUD y banner de tercio */
  /* ==================== HUD EN PARTIDA ==================== */
  #hud {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: max(6px, env(safe-area-inset-top)) 8px 0 8px;
    pointer-events: none;
  }

  .hud-shell {
    max-width: 780px;
    margin: 0 auto;
    background: rgba(20, 10, 5, 0.86);
    border: 1.5px solid rgba(212, 175, 55, 0.78);
    border-radius: 14px;
    padding: 6px 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.56);
  }

  .hud-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .hud-left {
    display: flex;
    flex-direction: column;
    min-width: 96px;
  }

  .hud-tercio {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fca5a5;
    white-space: nowrap;
  }

  .hud-score-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .hud-score {
    font-size: 18px;
    font-weight: 900;
    color: #fff8e7;
    line-height: 1.1;
  }

  .hud-tanda {
    font-size: 10px;
    font-weight: 900;
    color: #291204;
    background: linear-gradient(180deg, #fde047, #f59e0b);
    padding: 1px 6px;
    border-radius: 6px;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.16s, transform 0.16s;
  }

  .hud-tanda.show { opacity: 1; transform: scale(1); }

  .hud-center {
    flex: 1;
    max-width: 265px;
    display: flex;
    flex-direction: column;
    gap: 3.5px;
  }

  .bar-line {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .bar-lbl {
    font-size: 8.5px;
    font-weight: 800;
    text-transform: uppercase;
    width: 46px;
    text-align: right;
    color: #fde68a;
  }

  .bar-track {
    flex: 1;
    height: 7px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.38);
  }

  .bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.2s ease;
  }

  #ovFill { width: 22%; background: linear-gradient(90deg, #b91c1c, #f59e0b, #fef08a); }
  #faenaFill { width: 0%; background: linear-gradient(90deg, #db2777, #f59e0b, #fde047); }
  #duendeFill { width: 0%; background: linear-gradient(90deg, #f59e0b, #fde047, #ffffff); }

  .bar-val {
    font-size: 8.5px;
    font-weight: 800;
    width: 30px;
    color: #fef3c7;
  }

  .hud-right {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .hud-lives { font-size: 13.5px; letter-spacing: 1px; white-space: nowrap; }

  .hud-btn {
    pointer-events: auto;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.6);
    background: rgba(255, 255, 255, 0.08);
    color: #fde68a;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .hud-btn:active { transform: scale(0.92); }

  .hud-read-row {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(212, 175, 55, 0.22);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 9px;
    color: #e7d5b8;
  }

  .read-chips {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
  }

  .chip {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 6px;
    padding: 1px 5px;
    font-weight: 700;
    white-space: nowrap;
  }

  .chip.good { border-color: #4ade80; color: #bbf7d0; }
  .chip.warn { border-color: #f87171; color: #fecaca; }
  .chip.gold { border-color: #fde047; color: #fef08a; background: rgba(234, 179, 8, 0.22); }

  /* ==================== BANNER DE TERCIO ==================== */
  #banner {
    display: none;
    position: fixed;
    top: 108px;
    left: 0;
    right: 0;
    z-index: 12;
    pointer-events: none;
    text-align: center;
    padding: 0 12px;
  }

  .banner-ribbon {
    display: inline-block;
    background: linear-gradient(90deg, rgba(127, 29, 29, 0), rgba(127, 29, 29, 0.94) 15%, rgba(127, 29, 29, 0.94) 85%, rgba(127, 29, 29, 0));
    border-top: 2px solid #f59e0b;
    border-bottom: 2px solid #f59e0b;
    padding: 6px 26px;
  }

  #bannerTitle {
    font-size: 17px;
    font-weight: 900;
    color: #fde047;
    letter-spacing: 0.08em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
  }

  #bannerSub {
    font-size: 10px;
    font-weight: 700;
    color: #fef3c7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1px;
  }

