/* Menus stay in context beneath the active, independently scrolling dialog. */
.dialog-open { overflow: hidden; }
#options.overlay, #confirm.overlay {
  --dialog-top: max(14px, env(safe-area-inset-top));
  --dialog-bottom: max(14px, env(safe-area-inset-bottom));
  position: fixed;
  inset: 0;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--dialog-top) max(12px, env(safe-area-inset-right))
    var(--dialog-bottom) max(12px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 33%, #101c27a6, #080f17ed 82%);
}
#options.overlay { z-index: 5; }
#confirm.overlay { z-index: 6; }
#options.overlay > .panel, #confirm.overlay > .panel {
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  margin-block: auto;
}
#options[inert], #confirm[inert], .screen[inert], #hud[inert] { pointer-events: none; }
@media (pointer: fine) {
  #options[data-layer-active], #confirm[data-layer-active] { backdrop-filter: blur(4px) saturate(.75); }
}
@media (prefers-reduced-motion: no-preference) {
  #options[data-layer-active] > .panel, #confirm[data-layer-active] > .panel,
  #results[data-layer-active] > .panel, #combine[data-layer-active] > .panel {
    animation: popup-enter .22s cubic-bezier(.2,.75,.28,1) both;
  }
  @keyframes popup-enter {
    from { opacity: .55; transform: translateY(8px) scale(.986); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

#wave-call {
  --wave-accent: var(--threat-color, #dfff87);
  --brief-cut: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 10px 100%, 0 calc(100% - 10px));
  position: absolute;
  isolation: isolate;
  left: 50%;
  top: clamp(138px, 28%, 260px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(430px, calc(100% - 28px));
  max-width: none;
  padding: 12px 22px 14px 14px;
  text-align: left;
}
#wave-call::before, #wave-call::after {
  content: "";
  position: absolute;
  z-index: -1;
  clip-path: var(--brief-cut);
  pointer-events: none;
}
#wave-call::before {
  inset: 0;
  background: linear-gradient(123deg, var(--wave-accent), #50636c 44%, #25404a 90%);
}
#wave-call::after {
  inset: 1px;
  background:
    repeating-linear-gradient(110deg, #c5d2c237 0 3px, transparent 3px 6px) right 25px top / 34px 3px no-repeat,
    linear-gradient(110deg, #20313af7, #0e1922f7 72%);
}
.wave-call-art {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: linear-gradient(150deg, color-mix(in srgb, var(--wave-accent) 26%, #1c2932), #13202b);
  color: var(--wave-accent);
}
.wave-call-art svg { width: 26px; height: 26px; }
.wave-call-copy > * { display: block; }
#wave-call .micro { color: var(--wave-accent); font-size: 10px; letter-spacing: .09em; }
#wave-call strong { margin-top: 2px; font-size: clamp(20px, 5vw, 30px); line-height: 1.1; letter-spacing: -.035em; }
#wave-call small { margin-top: 4px; font-size: 12px; line-height: 1.3; color: #d5dcd8; }
.wave-call-time { position: absolute; inset: auto 15px 2px; height: 2px; background: #ffffff19; }
.wave-call-time span { display: block; width: 100%; height: 100%; transform-origin: left; background: var(--wave-accent); }
@media (max-width: 410px) {
  #wave-call { gap: 9px; padding: 9px 16px 11px 10px; }
  .wave-call-art { width: 38px; height: 38px; }
  .wave-call-art svg { width: 22px; height: 22px; }
  .shop-actions { width: 100%; flex-wrap: wrap; }
  .shop-actions .btn { flex: 1 1 110px; min-width: 0; padding-inline: 8px; gap: 6px; }
}
@media (max-height: 510px) and (orientation: landscape) {
  #wave-call { top: 115px; }
}
@media (prefers-reduced-motion: no-preference) {
  #wave-call:not([hidden]) { animation: briefing-enter .2s ease-out both; }
  @keyframes briefing-enter {
    from { opacity: .35; transform: translate(-50%, -5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
  }
}
