/* Shared combat lettering, with a single short announcer entrance. */
#level-banner {
  --announcement-ink: #14212b;
  --announcement-color: #ffcf67;
  position: absolute; left: 50%; top: 18%; z-index: 24;
  width: min(650px, 90%); box-sizing: border-box;
  padding: 10px 12px; gap: 5px; border: 0; border-radius: 0;
  background: none; box-shadow: none;
  transform: translateX(-50%); opacity: 0;
  pointer-events: none; user-select: none; isolation: isolate;
}
#level-banner[hidden], body:not(.match-playing) #level-banner { display: none !important; }
#level-banner[data-tone="aqua"] { --announcement-color: #a1f4eb; }
#level-banner[data-tone="crimson"] { --announcement-color: #ff6b5e; --announcement-ink: #2b1114; }
#level-banner[data-tone="teal"] { --announcement-color: #5be6d9; --announcement-ink: #0c2320; }
#level-banner[data-tone="violet"] { --announcement-color: #b98cff; --announcement-ink: #1c1130; }
#level-banner::before {
  content: ''; position: absolute; z-index: -1; inset: 3% -2%;
  background: radial-gradient(ellipse, #14212b9c, #14212b00 70%);
  pointer-events: none;
}
#level-banner strong {
  display: block; max-width: 100%;
  font: 400 clamp(44px, 5.6vw, 78px)/1.04 'Tideglass Bangers', Impact, sans-serif;
  letter-spacing: .015em; color: var(--announcement-color);
  -webkit-text-stroke: 5px var(--announcement-ink); paint-order: stroke fill;
  text-shadow: 2px 5px 0 var(--announcement-ink), 3px 7px 0 #08141b;
  overflow-wrap: anywhere;
}
#level-banner span, #level-banner em {
  color: #f5f3df; font: 800 14px/1.25 Manrope, sans-serif;
  text-shadow: 0 2px 3px #08141b, 0 0 8px #08141b;
  letter-spacing: 0; text-transform: none;
}
#level-banner em { color: #a1f4eb; font-size: 13px; }
#level-banner.show { animation: announcer-life 2.8s linear both; }
#level-banner.show strong { animation: announcer-impact 280ms cubic-bezier(.16,1,.3,1) both; }
#level-banner.show span, #level-banner.show em { animation: announcer-detail 220ms 100ms ease-out both; }
@keyframes announcer-impact {
  from { opacity: 0; transform: scale(1.42) rotate(-6deg); }
  to { opacity: 1; transform: scale(1) rotate(-2deg); }
}
@keyframes announcer-detail { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes announcer-life { 0% { opacity: 0; } 5%, 85% { opacity: 1; } 100% { opacity: 0; } }
@media (pointer: coarse) {
  #level-banner { top: calc(var(--edge-top, 8px) + 142px); padding: 4px; gap: 3px; width: 92%; }
  #level-banner strong { font-size: clamp(36px, 10vw, 48px); -webkit-text-stroke-width: 3px; text-shadow: 1px 3px 0 var(--announcement-ink), 2px 4px 0 #08141b; }
  #level-banner span, #level-banner em { font-size: 12px; }
  body:has(#offer-panel[style*="block"]) #level-banner { display: flex; top: calc(var(--edge-top, 8px) + 87px); left: calc(50% + 30px); width: calc(100% - 132px); }
  body:has(#offer-panel[style*="block"]) #level-banner strong { font-size: 32px; }
  body:has(#offer-panel[style*="block"]) #level-banner :is(span, em) { display: none; }
}
@media (pointer: coarse) and (max-height: 500px) {
  #level-banner, body:has(#offer-panel[style*="block"]) #level-banner { top: calc(var(--edge-top, 8px) + 8px); left: 52%; width: min(340px, 46%); }
  #level-banner strong { font-size: 42px; }
  #level-banner em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #level-banner.show strong, #level-banner.show span, #level-banner.show em { animation: none; transform: none; }
}

/* Screen-edge arrow toward an off-screen arena event: a rotated chevron, positioned + rotated inline
   by app.mjs (arenaArrowState's x/y/angle), tinted per the event's tone. */
#arena-arrow[hidden] { display: none; }
#arena-arrow {
  position: fixed; z-index: 23; left: 0; top: 0; width: 30px; height: 30px;
  margin: -15px 0 0 -15px; pointer-events: none;
  color: #ffcf67; filter: drop-shadow(0 2px 4px #08141bcc);
}
#arena-arrow[data-tone="teal"] { color: #5be6d9; }
#arena-arrow[data-tone="violet"] { color: #b98cff; }
#arena-arrow[data-tone="crimson"] { color: #ff6b5e; }
#arena-arrow::before {
  content: ''; position: absolute; inset: 0;
  clip-path: polygon(50% 0%, 100% 65%, 68% 65%, 68% 100%, 32% 100%, 32% 65%, 0% 65%);
  background: currentColor;
}
